i want to insert quotes into my dB table like:
but the " after 36 is throwing an error, how can i do this?Code:UPDATE $priceTable SET width=36" WHERE item LIKE 'greyItem';
i want to insert quotes into my dB table like:
but the " after 36 is throwing an error, how can i do this?Code:UPDATE $priceTable SET width=36" WHERE item LIKE 'greyItem';
Pretty sure you need to escape it like this
Code:UPDATE $priceTable SET width=36\" WHERE item LIKE 'greyItem';
Corrections to my coding/thoughts welcome.
hmm, get this error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
ERROR: Unclosed quote @ 33
STR: "
Oo, okay. Is width set as an integer or varchar(something non-integered)?
If it's an integer I don't think it can take the value with anything but numerals in it.
If it's varchar try
If your putting this into php and that is enclosed in double quotes you'll need to escaped the double quoteCode:UPDATE $priceTable SET width='36"' WHERE item LIKE 'greyItem';
PHP Code:$query = "UPDATE $priceTable SET width='36\"' WHERE item LIKE 'greyItem'";
Corrections to my coding/thoughts welcome.
weird, i get an error when i wrap it in single quotes
Code:#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
it is varchar
It could be the like throwing it off as well
orCode:UPDATE $priceTable SET width='36"' WHERE item = 'greyItem';
If this isn't being called in php I think the $priceTable will cause it to fail unless you set it as a variable. If this doesn't fix it please post how you are using it, the statement being used, and the message you receive.Code:UPDATE $priceTable SET width='36"' WHERE item LIKE '%greyItem%';
Corrections to my coding/thoughts welcome.
weird, when i do
i get an errorCode:UPDATE $priceTable SET repeat='NON-WOVEN' WHERE descript_1 LIKE 'Ori';
you can see that this dB is varchar
and that it can be accessed by select
![]()
Bookmarks