jeff5656 Posted March 23, 2011 Share Posted March 23, 2011 Ok I can't see anything wrong with tis but I get an invalid query. "You have an error in your SQL syntax, check the manual etc.:" $query = "insert into proc_exp (last_name, first_name, mrn, dob, staff, procedure, cpt, billing_date, diagnosis) VALUES ('".$row['lname']."', '".$row['fname']."', '".$row['mrn']."', '".$row['dob']."', '".$row['staff']."', '".$row['proc_name']."', '".$row['cpt']."', '".$row['proc_date']."', '".$row['dx']."' )"; echo $query."<br>"; mysql_query($query) or die ("Invalid query in while loop: " . mysql_error ()); Quote Link to comment Share on other sites More sharing options...
Maq Posted March 23, 2011 Share Posted March 23, 2011 Can you post the entire exact error? Quote Link to comment Share on other sites More sharing options...
jeff5656 Posted March 23, 2011 Author Share Posted March 23, 2011 Invalid query in while loop: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'procedure, cpt, billing_date, diagnosis) VALUES ('smith', 'bob', '1234' at line 1 Quote Link to comment Share on other sites More sharing options...
Maq Posted March 23, 2011 Share Posted March 23, 2011 'procedure' is a MySQL reserved word: http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html Quote Link to comment Share on other sites More sharing options...
jeff5656 Posted March 23, 2011 Author Share Posted March 23, 2011 "'procedure' is a MySQL reserved word:" Ahh. thanks! Quote Link to comment Share on other sites More sharing options...
jeff5656 Posted March 23, 2011 Author Share Posted March 23, 2011 Did they remove the SOLVE button or is my adblock blocking it? I can't find it. Quote Link to comment Share on other sites More sharing options...
Maq Posted March 23, 2011 Share Posted March 23, 2011 Did they remove the SOLVE button or is my adblock blocking it? I can't find it. It got lost during the forum upgrade. It should be implemented back in the near future. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.