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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -