Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.11.5

Request #4713 builde sql use prepare feature
Submitted: 2005-06-30 02:34 UTC
From: kenchou77 at gmail dot com Assigned:
Status: Suspended Package: DB_DataObject
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-30 02:34 UTC] kenchou77 at gmail dot com
Description: ------------ prepare & execute sql(like PEAR DB Package) Reproduce code: --------------- require_once 'DB/DataObject.php'; $config = parse_ini_file('../example.ini',TRUE); foreach($config as $class=>$values) { $options = &PEAR::getStaticProperty($class,'options'); $options = $values; } $sell = DB_DataObject::factory("SELL_TABLE"); $sell->whereAdd('dele = 0'); $sell->orderBy('ID DESC'); $sell->limit(0,20); $count = $sell->find(); Expected result: ---------------- debug output: QUERY: SELECT ... FROM (SELECT rownum as linenum, ... FROM (SELECT * FROM SELL_TABLE WHERE dele = 0 ORDER BY ID DESC ) WHERE rownum <= 20) WHERE linenum >= 1 Actual result: -------------- for Oracle(and other db supported): QUERY: SELECT ... FROM (SELECT rownum as linenum, ... FROM (SELECT * FROM SELL_TABLE WHERE dele = ? ORDER BY ID DESC ) WHERE rownum <= ?) WHERE linenum >= ?

Comments

 [2005-06-30 02:47 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-06-30 04:31 UTC] kenchou77 at gmail dot com
sorry for my mistake. Actual result: -------------- debug output: QUERY: SELECT * FROM SELL_TABLE WHERE dele = 0 ORDER BY ID DESC I hope the sql like "SELECT * FROM SELL_TABLE WHERE dele = ?" ,that can reuse by oracle.
 [2005-06-30 06:09 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2010-04-26 03:59 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!