query error

From: Date: Sun, 05 May 2002 06:44:27 +0000
Subject: query error
Groups: php.db 
Request: Send a blank email to php-db+get-18977@lists.php.net to get a copy of this message
when i perform query an mysql db, to insert a new record, the PHP says: Warning: Supplied argument is not a valid MySQL result resource in g:\wwwroot\phpusermanager-1.0\add_order.php on line 24 the snippet is as follows <? // connect to the database $conn = mysql_connect ($db_host, $db_user, $db_passwd); // select database mysql_select_db ($db_used, $conn); // SQL statement $query = "INSERT into order (Ctr_no, OID, Person_in_charge, Source, Destination, Status) VALUES ('$container_num', '$order', '$referrer', '$source', '$dest', '$status')"; mysql_query ($query, $conn); mysql_close($conn); ?> why the argument isn't valid? how to solve this problem?

« previous php.db (#18977) next »