Jump to content

asgsoft

Members
  • Posts

    56
  • Joined

  • Last visited

Posts posted by asgsoft

  1. [!--quoteo(post=358508:date=Mar 26 2006, 08:09 AM:name=khendar)--][div class=\'quotetop\']QUOTE(khendar @ Mar 26 2006, 08:09 AM) [snapback]358508[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Addslashes puts backslashes before all of the apostrophes to prevent them breaking the query as you insert the data. They are still stored in the database - just in the form \'. When you need to print the data out you use stripslashes() to remove all of the backslashes and print the data in its original form.
    [/quote]


    i did it and i am getting this error now:

    [code]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 'n)', 'Keyboard', 'testing the it\'s ok', '', '')' at line 2[/code]
  2. I am making a script that allows you to enter messages and store in a db.

    It works perfect on localhost but when I put it on a server I get this error:

    [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]

    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 's OK', '', '')' at line 2
    [/quote]

    I gathered it was to do with the fact I have an [b]'[/b] in the message.

    Is there a way to get rid of it.

    This is my sql query:

    [code]
    mysql_query("INSERT INTO `sim` ( `id` , `name` , `artist` , `category` , `bpm` , `type` , `padkey` , `description` , `file` , `rating` )
    VALUES ('$id', '$name', '$artist', '$category', '$bpm', '$stype', '$padkey', '$description', '$file', '')") or die(mysql_error());
    [/code]

    Thanks for your help in advance
×
×
  • 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.