Jump to content

Recommended Posts

Posted

Hello All- I'm new to this forum. Looks great. Me and my client are trying to enter some info into his dbase using phpmyadmin in our control panel and getting an error message. What can be wrong in this piece of code?

 

>INSERT INTO OFFER(OID,MID,OFFER_URL,B_DATE,E_DATE)VALUES(1,1,"<b><a href=""                "" target=""      "">Hot Deal <br></a></b>This is an Apparel Link",curdate(),curdate());

 

Looks like there may be a problem with the & Quote when entered into phpmyadmin, we get the following error message:

 

Error

SQL-query :

INSERT INTO OFFER( OID, MID, OFFER_URL, B_DATE, E_DATE )

VALUES ( 1, 1 , & quot

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 '&quot' at line 1

 

If you need more info, please I will be happy to provide . . . :)

 

Thanks!

Posted

Hi CRO8.

 

It looks as if you need quotes around the value that goes into the OFFER_URL field:

INSERT INTO OFFER(OID,MID,OFFER_URL,B_DATE,E_DATE)VALUES(1,1,'"<b><a href=""                "" target=""      "">Hot Deal <br></a></b>This is an Apparel Link"',curdate(),curdate());

so it gets seen as a literal value. Otherwise the parser gets confused. I've underlined them in the above, though you still have to look pretty hard to see them.

 

Hope this helps

Jim

Posted

<_ welcome to the family cro8 src="%7B___base_url___%7D/uploads/emoticons/default_laugh.png" alt=":lol:">

 

Anymore questions just ask. Someone will be sure to help.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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