note 33572 added to function.mysql-query

From: Date: Tue, 01 Jul 2003 03:14:46 +0000
Subject: note 33572 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-51246@lists.php.net to get a copy of this message
Anyone can tell me what is wrong with the following: // Above this, the integers $p_global_id, $follow_up, $q1, $q2, $q3 have been previously declared, as well as the connection to the appropriate database $query1 = 'insert into audit_patient_data(p_global_id,follow_up,question,value,username) values('; $query1 .= $p_global_id; $query1 .= ',' . $follow_up; $query1 .= ',' . '1'; $query1 .= ',' . $q1; $query1 .= ',"' . $user_serv_name; $query1 .= '")'; $result1 = mysql_query($query1) or die('Could not add audit information for first question to database'); $query2 = 'insert into audit_patient_data(p_global_id,follow_up,question,value,username) values('; $query2 .= $p_global_id; $query2 .= ',' . $follow_up; $query2 .= ',' . '2'; $query2 .= ',' . $q2; $query2 .= ',"' . $user_serv_name; $query2 .= '")'; $result2 = mysql_query($query2) or die('Could not add audit information for second question to database'); The error message 'Could not add audit information for second question to database' appears. However, if i remove the or die part, there is no problem (of course, the query isn't executed) ---- Manual Page -- http://www.php.net/manual/en/function.mysql-query.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33572 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33572&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33572&report=yes

« previous php.notes (#51246) next »