php - Why this query doesn't works -
i not confirmed query... feel somewhere cu or ci has been misplaced... query worked without using $db->namequote in sql.
$query = 'select '. $db->namequote(cu.'id') .' '. $db->namequote('#__users'), $db->namequote('#__community_cinvit' ci) .' '. $db->namequote(cu.'email').'='.$db->quote(ci.'to_email') .'and'. $db->namequote(ci.'point_given').'='.$db->quote('1'); $db->setquery($query); $conn = $db->loadresult(); echo $conn;
is there error in cu , ci
add white space before .' and'.
, add cu
$db->namequote('#__users' cu)
$query = 'select '. $db->namequote(cu.'id') .' '. $db->namequote('#__users' cu), $db->namequote('#__community_cinvit' ci) .' '. $db->namequote(cu.'email').'='.$db->quote(ci.'to_email') .' and'. $db->namequote(ci.'point_given').'='.$db->quote('1'); $db->setquery($query); $conn = $db->loadresult(); echo $conn;
Comments
Post a Comment