RE: [PHP-DB] newbie: MySQL Problem or severe ignorance..

From: Date: Tue, 01 Jan 2002 12:50:40 +0000
Subject: RE: [PHP-DB] newbie: MySQL Problem or severe ignorance..
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15294@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Chris Hogben, > I've just been looking at this snippet, and wondering why it's not working.. > Either i'm doing something wrong, or i'm just totally ignorant.. (More > likely the latter). But if anyone can help me out, please let me know.. > > --- > > $query = "SELECT * from counter"; > $result = mysql_query($query); incorrect - must be mysql_query($database,$query); or better you use mysql_db_query(...), in this case a id will generated if no id for the query-executing is generated. > $numone = mysql_numrows($result); > $i = 0; > while ($i <= $numone) { > $seekrow = mysql_data_seek($result, $i); > $fetchrow = mysql_fetch_row($result); > $time = $fetchrow["time"]; > echo "$i = $time<br>"; > $i++; > } > > --- > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net - ---------------------------------- E-Mail: rhelms@mayn.de Date: 01-Jan-2002 Time: 13:48:00 This message was sent by XFMail - ---------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Weitere Infos: siehe http://www.gnupg.org iD8DBQE8MbCfEK4asBW3N7wRArMPAKC2GPb8uwDgEUn2dOZG2B2PkXESSACgkDIQ oFxpZgl8eue2n39eG71O0uw= =DK3J -----END PGP SIGNATURE-----

« previous php.db (#15294) next »