Page 1 of 1

having trouble inserting something into SQL database

Posted: Sun Feb 04, 2007 8:35 pm
by psychotomus
im trying to insert <script>waspEmbed('example1.flv', 500, 367);</script>


i guess its using the , to seperate fields or something. how do i insert this?

Posted: Sun Feb 04, 2007 8:52 pm
by feyd
Can you clarify with any errors?

Posted: Mon Feb 05, 2007 9:52 pm
by phpice
If you are trying to insert that exact text, then you could have problems depending on how you quote your values. If you quote the text with single quotes, you will need to escape your single quotes in your text. For example, if your field is named myfield, then in MySQL you would do:

Code: Select all

...SET myfield='<script>waspEmbed(\'example1.flv\', 500, 367);</script>'
The comma should not be a problem as long as you have correctly quoted your value.

You might like to check out http://dev.mysql.com/doc/refman/5.0/en/ ... yntax.html for more info using MySQL.