FraanXT Posted May 28, 2014 Share Posted May 28, 2014 Can you guys tell me where is the error please... $sql2= ('CREATE TABLE `'.$pub_unik.'` (ID SERIAL,ID_Use CHAR(30),Comment TEXT,Like INT,Score CHAR(30))'); I can't find... Thank you guys Quote Link to comment https://forums.phpfreaks.com/topic/288847-mysql-insert-error/ Share on other sites More sharing options...
Psycho Posted May 28, 2014 Share Posted May 28, 2014 How do you know there is an error? Did you check for an error from MySQL? If you had, I would have expected you would have provided it. FYI: I know what the problem is, but I'm going to make you work for it. Sorry, I believe in teaching someone to fish as opposed to just giving them one. So, please post the error you receive. Quote Link to comment https://forums.phpfreaks.com/topic/288847-mysql-insert-error/#findComment-1481211 Share on other sites More sharing options...
FraanXT Posted May 29, 2014 Author Share Posted May 29, 2014 How do you know there is an error? Did you check for an error from MySQL? If you had, I would have expected you would have provided it. FYI: I know what the problem is, but I'm going to make you work for it. Sorry, I believe in teaching someone to fish as opposed to just giving them one. So, please post the error you receive. I'm getting this mysql error: 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 'Like INT,Score CHAR(30))' at line 1 Tried some things but still getting the error TT, Im nubie in mysql Quote Link to comment https://forums.phpfreaks.com/topic/288847-mysql-insert-error/#findComment-1481250 Share on other sites More sharing options...
PravinS Posted May 29, 2014 Share Posted May 29, 2014 you have used "Like" as column name, it is reserved word in mysql Quote Link to comment https://forums.phpfreaks.com/topic/288847-mysql-insert-error/#findComment-1481253 Share on other sites More sharing options...
Psycho Posted May 29, 2014 Share Posted May 29, 2014 Tried some things but still getting the error TT, Im nubie in mysql Yep, I understand that. And I don't expect you would have figured out the error through that (reserved words usually catch everyone at least once in the beginning). But, when asking for help it's common courtesy to provide the errors (if you are getting them). In this case I could have told you what the problem was from the query you posted. But, it could have been any number of problems that could not be identified through the query alone. Quote Link to comment https://forums.phpfreaks.com/topic/288847-mysql-insert-error/#findComment-1481256 Share on other sites More sharing options...
FraanXT Posted May 29, 2014 Author Share Posted May 29, 2014 Yep, I understand that. And I don't expect you would have figured out the error through that (reserved words usually catch everyone at least once in the beginning). But, when asking for help it's common courtesy to provide the errors (if you are getting them). In this case I could have told you what the problem was from the query you posted. But, it could have been any number of problems that could not be identified through the query alone. I will do as you say next time don't worry , ty for help guys! Quote Link to comment https://forums.phpfreaks.com/topic/288847-mysql-insert-error/#findComment-1481258 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.