I am just trying to insert these objects into a table with php.
$sql = 'INSERT INTO table VALUES( '.$active.' , '.$id.' , '.$time.' , '.$url.' ,"some string" )';
In the above code, the url is: http://www.youtube.com/watch?v=sAYc3gGjYW8
When I leave the url column empty, it works, when I put the url in it, then it does not work, and I get the following error.
"Error: you have an error in the SQL syntax, check the manual that matches the version of your MySQL server for the correct syntax to use next to ': //www.youtube.com/watch? V = sAYc3gGjYW8,' some string ')' in the line 1.
Question:
Why url is not inserted the same way as in a regular string?
Is there some kind of function that I need to execute on url_string before it is accepted by MySQL?
PS - url column is currently VARCHAR (256).
...