Jump to content

Weird Mysql problem


JamesThePanda

Recommended Posts

Hi

Im using a form to submit to a a file which theen inserts the values in to the database.

 

Im having a weird problem whenever I insert enter numbers into the form thats fine they appear in the database but when I submits words they dont come up.

 

Can anyone hed any light on this.

 

I have the field set to varchar apart from the id field which is an interger.

 

 

anyone have any clue whats going on

 

 

thanks

 

James

Link to comment
https://forums.phpfreaks.com/topic/189841-weird-mysql-problem/
Share on other sites

anyone have any clue whats going on

Yes, your code is doing something wrong, but it would take seeing it to help you with which one(s) of the several different possibilities it is doing that could cause that symptom.

 

Best guess is that you don't have any single-quotes around data values in the query (per the solutions given in your previous thread), so strings cause the query to fail due to sql syntax error, whereas numbers are getting converted to strings in the context that they are being used in the query and they work.

Link to comment
https://forums.phpfreaks.com/topic/189841-weird-mysql-problem/#findComment-1001786
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.