help with php - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21) +---- Thread: help with php (/showthread.php?tid=5304) |
help with php - andrewjs18 - 03-16-2010 Hello there... I had this php script built for me a while back, but I recently deleted a file that was needed so I had to work to rebuild it. I keep getting this annoying error when I try to insert data into the database so maybe someone here will know what the problem is..... when I try to insert data into the database, I get the follow error: Unknown column 'Data_Distance' in 'field list' here's my insert.php file: Code: <?PHP here's a link to form where the data is inserted: http://www.andrewshemo.com/reloading/insert.php RE: help with php - blackstrider - 03-19-2010 Check your table. I'm guessing that the column 'Data_Distance' does not exist or the column it is referring to is having a different name. RE: help with php - andrewjs18 - 03-19-2010 (03-19-2010, 08:12 AM)blackstrider Wrote: Check your table. I'm guessing that the column 'Data_Distance' does not exist or the column it is referring to is having a different name. I'm not sure.....but here's a screenshot for you to check out. here's the mysql structure I suppose you'd call it: Code: CREATE TABLE IF NOT EXISTS `Guns` ( RE: help with php - SLiM - 04-13-2010 (03-16-2010, 10:53 PM)andrewjs18 Wrote: http://www.andrewshemo.com/reloading/insert.php Post a link to it is quite risky. RE: help with php - Lord-Nikon - 06-13-2010 The table structure you sent was for a table called "Guns". The table you are inserting into is called "NewGuns". Could you please send us the table structure for a table called "NewGuns" or alternative change your insert query to "Guns" : $result = mysql_query("INSERT into Guns(Caliber,Bullet,Powder,Primer,OAL,Data_Distance,Grouping,Bench) VALUES ('$Caliber','$Bullet','$Powder','$Primer','$OAL','$Data_Distance','$Grouping','$Bench')") or die(mysql_error()); RE: help with php - andrewjs18 - 07-13-2010 (06-13-2010, 04:30 AM)Lord-Nikon Wrote: The table structure you sent was for a table called "Guns". The table you are inserting into is called "NewGuns". Could you please send us the table structure for a table called "NewGuns" or alternative change your insert query to "Guns" : $result = mysql_query("INSERT into Guns(Caliber,Bullet,Powder,Primer,OAL,Data_Distance,Grouping,Bench) VALUES ('$Caliber','$Bullet','$Powder','$Primer','$OAL','$Data_Distance','$Grouping','$Bench')") or die(mysql_error()); this issue has been resolved. |