starting PHP developer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simplyV
Forum Newbie
Posts: 1
Joined: Tue Jan 27, 2009 3:42 am

starting PHP developer

Post by simplyV »

Please help me find errors in my code, because it is not displaying what i resquested.
Please answer A.S.A.P!!!!

$query = mysql_query("SELECT * FROM member");
$result = mysql_query($query);

while ($row = mysql_fetch_array($result))
{
if(mysql_num_rows($result) == 0)
$result = mysql_query("UPDATE member SET flgCurrent = 'false' WHERE idMember =" .$row[0]);
echo $row;
echo "<br />";





}
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: starting PHP developer

Post by Apollo »

1. See the General Posting Guidelines for this forum (espesially nr 7 and 9)

2. Exactly what are you trying to do here?
simplyV wrote:$query = mysql_query("SELECT * FROM member");
$result = mysql_query($query);
To perform a query, you only have to call the mysql_query function once :)
Post Reply