JamesThePanda Posted January 26, 2010 Share Posted January 26, 2010 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 More sharing options...
jl5501 Posted January 26, 2010 Share Posted January 26, 2010 I would need to see your table definition, and your query code to be able to answer this Link to comment https://forums.phpfreaks.com/topic/189841-weird-mysql-problem/#findComment-1001784 Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2010 Share Posted January 26, 2010 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 More sharing options...
JamesThePanda Posted January 26, 2010 Author Share Posted January 26, 2010 Hi Its turns out I missed some single quote Thanks again guys Link to comment https://forums.phpfreaks.com/topic/189841-weird-mysql-problem/#findComment-1001836 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.