Hi there. 🙂
This is probably so simple but I can't see a good way of doing it...
Basically, the problem is when I have a variable which is a string and it has a ' in it.
When this variable is then used within a SQL select statement it fails because, I guess, the ' needs to be escaped somehow.
$db_name = "Paul's database"
$sql = " SELECT * FROM test_forum_db
WHERE db_name = $db_name ";
Could anyone help me out on this?.
Thanks in advance. 🙂