How do I express the where clause in this:
select * from TABLE where LENGTH(COLUMN) > 0
in xPDO?
$criteria->where(array('LENGTH(customer_po_num):>' => '0'));
does not work, it results in something like this:
`InventoryData`.`LENGTH(customer_po_num)` > '0'
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
I wound up doing it like this:
$criteria->where(
array('`InventoryData`.`id` NOT IN (SELECT id FROM modx_gssi_inventory_data where LENGTH(customer_po_num) > 0)'));
Not sure is that is the nicest way of doing it, but it works.
*** Not just websites, we also create signage, banners, print, trade show displays and more! ***
Sean Kimball CLP, CLS.
Technical Director / Sr. Developer | BigBlock Studios
._______________________________________________.
Bigblock Studios
http://www.bigblockstudios.ca Web site design & development.
27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
phone/fax: 905-426-5525
something like this could work:
$criteria->where(LENGTH(customer_po_num)>'0', xPDOQuery::SQL_AND);