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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.