Select then update

From: Date: Sat, 23 Mar 2002 23:58:14 +0000
Subject: Select then update
Groups: php.general 
Request: Send a blank email to php-general+get-89862@lists.php.net to get a copy of this message
Hi all! Just wondering, If I have a query like: $query = "SELECT name FROM users"; $ret = mysql_query($query); while(list($name) = mysql_fetch_row($ret)) or die("Error: ".mysql_error()); print ("your name is $name); $query_update ["name"] = ("UPDATE my_other_table set name = $name"); $result = mysql_query($query_update["name"]); or die("Error: ".mysql_error()); Why wont this work? I am trying to select the user name from the user table and then update another table with that user name. But it doesn't seem to want to update the other table I get no errors when running the script. Thanks in advance Jennifer Downey

« previous php.general (#89862) next »