Jump to content

[Cakephp] Between Date condition?


alvin567

Recommended Posts

Great!!

 

    $conditions = array(

                        'Renewal.year' => $renewal_period,

                        'Renewal.void' => 0,

                        'Renewal.approved' => 3,

                        'Claim.void' => 0,

                        'Claim.draft' => 0

                        );

 

Can I do this?

 

  array_push($conditions, array('Claim.created BETWEEN ? and ?' => array(strtotime($start), strtotime($end))));

 

 

Link to post
Share on other sites

On top of that I have this error?

Warning (2): mssql_query() [function.mssql-query]: message: Conversion failed when converting date and/or time from character string. (severity 16) [CORE/cake-1.2.6/libs/model/datasources/dbo/dbo_mssql.php, line 181]

Warning (2): mssql_query() [function.mssql-query]: General SQL Server error: Check messages from the SQL Server. (severity 5) [CORE/cake-1.2.6/libs/model/datasources/dbo/dbo_mssql.php, line 181]

Warning (512): SQL Error: Conversion failed when converting date and/or time from character string. [CORE/cake-1.2.6/libs/model/datasources/dbo_source.php, lin

Link to post
Share on other sites
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.