roldahayes Posted February 27, 2007 Share Posted February 27, 2007 any idea whats from with this? MySQL said: #1064 - 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 '( ) VALUES ( 'Car_Make','Model','Car_ID','Prod_Type','Priority','','section','P' at line 1 ?? Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/ Share on other sites More sharing options...
magnetica Posted February 27, 2007 Share Posted February 27, 2007 Well can you tell us what line 1 says? Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195402 Share on other sites More sharing options...
roldahayes Posted February 27, 2007 Author Share Posted February 27, 2007 Sorry, thought that was it... INSERT INTO ( ) VALUES ( 'Car_Make','Car_Model','Car_ID','Prod_Type','Prod_Code','Priority','Prod_Model','Prod_Make','Product_Desc','Prod_REF','Prod_ExVat','Post_ID','RBX_LitreSize','RBX_Colour','RBX_MRSP','CBR_CatNo','CBR_RackSize','CBR_Finish','RHB_Year','RHB_BarSetRef','RHB_Age','RHB_FootRack','RHB_Aerobar','RHB_Stdbar','RHB_GutterKit','RHB_PriceAeroBar','RHB_PriceStdBar' ); Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195407 Share on other sites More sharing options...
Daleeburg Posted February 27, 2007 Share Posted February 27, 2007 having not seen the code and completely guessing here: it should be somthing like $query = 'INSERT INTO [tablename] ([column1], [column2],....) VALUES ("'.$[var1].'","'.$[var2].'", ....)'; Can you post the whole code? (in a code box) Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195417 Share on other sites More sharing options...
roldahayes Posted February 27, 2007 Author Share Posted February 27, 2007 The whole file is attached. As you can guess im VERY new to all this! [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195418 Share on other sites More sharing options...
Daleeburg Posted February 27, 2007 Share Posted February 27, 2007 i believe you need to define a table Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195419 Share on other sites More sharing options...
roldahayes Posted February 27, 2007 Author Share Posted February 27, 2007 right, so how do i do that? Im using PHPmyadmin Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195420 Share on other sites More sharing options...
Daleeburg Posted February 27, 2007 Share Posted February 27, 2007 srry dont use PHPmyadmin, but if you want to do it by hand you would just edit it so that each line looks like this INSERT INTO Cars ( ) VALUES ( 'CITROEN','Berlingo - 1996 on','CV2','BH','2','1','VG136','GKL','Tail Gate where Cars is the name of the table Link to comment https://forums.phpfreaks.com/topic/40386-sql-error-1064/#findComment-195424 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.