Change voicemail_id from text to numeric and remove the cast on voicemail_id.
This commit is contained in:
parent
a87fbb058e
commit
9dd5667118
|
|
@ -84,7 +84,7 @@
|
|||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_id";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "numeric";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enter the voicemail id.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "voicemail_password";
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ else {
|
|||
//get the list
|
||||
$sql = str_replace('count(*) as num_rows', '*', $sql);
|
||||
if (strlen($order_by) > 0) {
|
||||
$sql .= ($order_by == 'voicemail_id') ? "order by cast(voicemail_id as int) ".$order." " : "order by ".$order_by." ".$order." ";
|
||||
$sql .= ($order_by == 'voicemail_id') ? "order by voicemail_id ".$order." " : "order by ".$order_by." ".$order." ";
|
||||
}
|
||||
else {
|
||||
$sql .= "order by cast(voicemail_id as int) asc ";
|
||||
$sql .= "order by voicemail_id asc ";
|
||||
}
|
||||
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
|
|
|
|||
Loading…
Reference in New Issue