I am using this query in api
if (isset($json['version'])) {
$client_cache_version = @$json['version'];
$version_sql = $db->quoteInto("SELECT max(messageVersion) as version FROM messageTable");
$version_results = $db->fetchAll($version_sql);
$version_array = $version_results['0'];
$max_version = $version_array['version'];
if($max_version > $client_cache_version){
$sql = $db->quoteInto("SELECT * FROM messageTable");
$results = $db->fetchAll($sql);
$count = array(
'count' => sizeof($results)
);
all code working fine but problem in
$version_sql = $db->quoteInto("SELECT max(messageVersion) as version FROM messageTable");
when i try to check this code on curl I got this error
Warning: Missing argument 2 for Zend_Db_Adapter_Abstract::quoteInto()
I know in the case of Using quoteInto() multiple arguments are reguired but i have not an multiple argument right now so what i can do ?
From the Zend API on
Db_Adapter_Pdo_Mysql::quoteInto():The placeholder is a question-mark; all placeholders will be replaced with the quoted value. For example:
—
Note that the value is REQUIRED. You shouldn’t be using this method if you’re not binding any params.