note 31470 added to function.mysql-num-rows

From: Date: Wed, 23 Apr 2003 08:41:33 +0000
Subject: note 31470 added to function.mysql-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-46967@lists.php.net to get a copy of this message
I have one problem, and Im trying to solve one week alredy. But nothing. If I wanna some data from MySQL database by PHP. So I can use SQL like in this code sample: [PHP] $query= "SELECT * FROM tab WHERE den=$den and mesic=$mesic"; $svatek=mysql_query($query); $row_sv=mysql_fetch_array($svatek); $jmeno=$row_sw[jmeno]; return $jmeno; Everytime, if I use the WHERE clausule, the $jmeno variable is empty (""). [PHP] If I use just "SELECT * FROM tab"; so I works fine. But verz often I need just one record from the table. Please help. Thanx U. -- http://www.php.net/manual/en/function.mysql-num-rows.php http://master.php.net/manage/user-notes.php?action=edit+31470 http://master.php.net/manage/user-notes.php?action=delete+31470 http://master.php.net/manage/user-notes.php?action=reject+31470

« previous php.notes (#46967) next »