Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I need to pass the following SQL statement:

UPDATE table_products 
SET shipping = "a:5:{s:16:"min_items_in_box"; i:0;s:16:"max_items_in_box"; i:0;s:10:"box_length";i:0;s:9:"box_width";i:0;s:10:"box_height";i:0;}";

I'm getting a syntax error from phpMyAdmin panel, asking to check the syntax. Could you please let me know what is wrong with the syntax?

share|improve this question
1  
What RDBMS is this for ??? –  RolandoMySQLDBA Feb 19 '13 at 20:03
1  
Says phpmyadmin @RolandoMySQLDBA. I'd say RolandoSQL :) –  FreshPhilOfSO Feb 19 '13 at 22:40
add comment

closed as off topic by Mark Storey-Smith, Paul White, dezso, Jon Seigel, RolandoMySQLDBA Feb 21 '13 at 19:32

Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Pass strings to the dbms within single quotes, not within double quotes.

UPDATE table_products 
SET shipping = 'a:5:{s:16:"min_items_in_box";i:0;s:16:"max_items_in_box";i:0;s:10:"box_length";i:0;s:9:"box_width";i:0;s:10:"box_height";i:0;}';
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.