You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Total data set length
$count_request = "SELECT COUNT(`{$primaryKey}`)";
if ($joinQuery) {
$count_request .= $joinQuery;
} else {
$count_request .= "FROM `$table`";
}
I get this sql:
SELECT COUNT(``company`.`id``) FROM `company` LEFT JOIN `city` ON `company`.`city` = `city`.`id`
And error
{"error":"An SQL error occurred: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'company`.`id``) FROM `company` LEFT JOIN `city` ON `company`.`city` = `city`.`id' at line 1"}
And when i set
$primaryKey = 'company.id';
I get this sql:
SELECT COUNT(`company.id`) FROM `company` LEFT JOIN `city` ON `company`.`city` = `city`.`id`
And error
{"error":"An SQL error occurred: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'company.id' in 'field list'"}
I think that need set
$count_request = "SELECT COUNT({$primaryKey})";
without
`
And use
$primaryKey = '`company`.`id`';
The text was updated successfully, but these errors were encountered:
tagplus5
changed the title
SQLSTATE[42000]
SQLSTATE[42000] OR SQLSTATE[42S22]
Dec 19, 2015
When i set
in ssp.class on this part
I get this sql:
And error
And when i set
I get this sql:
And error
I think that need set
without
And use
The text was updated successfully, but these errors were encountered: