I need to execute a sql query where I need to use a apostrophe because I search for an email address. When I now type the ''
in the query they become a variable pointer but they should just tell mysql that this is a string.
How can I tell the program to use them in a different way? I already tried pdo->quote
.
$statement = $pdo->prepare("SELECT user_id FROM tbl_server WHERE user_id = (SELECT user_id from tbl_user where Email = ':email') "); // here i need the normal apostrophe
$result = $statement->execute(array('email' => $email));
$user = $statement->fetch();