Hi Allen
Sorry about opening a new thread since I closed last one as below, but this is a new issue. http://datatables.net/forums/discussion/25049/issue-about-sql-select
Editor where() working fine with single SQL where condition But when I trying to make two conditions like SQL below, where() function is not quite right. ( I have read API and trying to use array as parameter, but still failed)
SQL:
select ...... from ..... where DATE_FORMAT(time,'%Y\-%m\-%d') = "2014-12-12" AND media_type = "facebook"
the code I am using:
->where( array("DATE_FORMAT(time,'%Y\-%m\-%d')", "media_type"), array("2014-12-12","facebook") )
for single condition as below, it is working.
->where("DATE_FORMAT(time,'%Y\-%m\-%d')",$time)
I also try this , but not working as well
$key = array("message","media_type");
$value = array("today weathere","facebook");
$op=array("=","=");
->where( $key,$value,$op)
based on your document on line 360
http://editor.datatables.net/docs/current/php/source-class-DataTables.Editor.html#356
conditions to use: where( array('fieldName', ...), array('value', ...) );
don know why it is not working.