MySQL Forums
Forum List  »  Newbie

Variables in while-loop without content
Posted by: Marcel Ahrensfeld
Date: December 09, 2010 04:41PM

Hey guys,

i dont know why my script doesnt work. I executed the query in PHPmyAdmin and it did work as desired.

$switch_world_sql = "SELECT * FROM profiles WHERE user_id = ".$user_id." AND world_id = ".$world." LIMIT 1";
$switch_world_res = mysql_query($switch_world_sql) or die (mysql_error());
while ($switch_world_while = mysql_fetch_assoc($switch_world_res)){
$switch_world_status = $swtich_world_while['status'];
$switch_world_id = $switch_world_while['id'];
}

Is there another to save contents out of a database in variables?



Edited 1 time(s). Last edit at 12/09/2010 04:49PM by Marcel Ahrensfeld.

Options: ReplyQuote


Subject
Written By
Posted
Variables in while-loop without content
December 09, 2010 04:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.