<?php
$user_id = 23;
$abc_username = "orange apple";
"WHERE u.user_type = 2 AND u.status = 1 AND (u.sponsor_id = '".$user_id."' OR u.placement = '".$abc_username."' )"
Syntax error on '".$abc_username."' because '".(only accept integer, not accept string)."'; May you tell me what is the correct syntax to put php variable that holding string value?
I have tried \'".$abc_username."\' as the solution from this page Put double quotes in a mysql string with PHP
but still syntax error.