note 33572 rejected from function.mysql-query by didou

From: Date: Tue, 01 Jul 2003 08:20:26 +0000
Subject: note 33572 rejected from function.mysql-query by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51252@lists.php.net to get a copy of this message
Note Submitter: rajram@bergen.org ---- 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)

« previous php.notes (#51252) next »