Covert into Cakephp query with subquery -
Covert into Cakephp query with subquery -
does know how transform query:
select * diminventory
partnumber='350964-b22' or partnumber in (select partnumber dimparts
parentpartnumber='350964-b22')
in cakephp query
thanks
i'm not 100% you're asking yet, here's brief tutorial on cakephp querying.
$this->modelname->query("select * tablename limit 2;");
you query model, utilize literal tablename. utilize sql "as" keyword rename keys of resultant array.
sample results:
array ( [0] => array ( [tablename] => array ( [id] => 1304 [user_id] => 759 ) ) [1] => array ( [tablename] => array ( [id] => 1305 [user_id] => 759 ) ) )
cakephp subquery
Comments
Post a Comment