- How do I generate complex statements?
e.g. "WHERE (name = "duck" OR name = "zebra") AND lifespan < 5"
- Is there a way to retrieve the result set? I maybe have 10000 resulting rows that I want to display, but not load into memory at once.
- MDB2_TableBrowser.php has the wrong location
- * @package MDB2_TableBrowser
* @category Database
* @author Lukas Smith <email@example.com>
- do not use ini_set in your files
- properties are not documented
- "@param unknown_type" doesn't help anyone
- you are writing php5 code. no & anymore to get references ("=& new")
- use phpcs on your code
- provide an array and an iterator interface, so that I can use
$browser instead of $browser->getRow(0)
foreach ($browser as $row) instead of foreach($browser->getRows())
- "Data Reterival functions"?
- you don't escape the data directly in insertRow
- "print $insert_sql;" shouldn't be in your code, same for "print $query"
- updateRow generates its own LIMIT statement - you should use mdb2' inbuilt function for that
- no docblocks for methods at the bottom
- what if I like db row objects? why do you force "$result->fetchRow(MDB2_FETCHMODE_ASSOC)"?
- use quoteSmart instead of quote
- MDB2_TableBrowser_DBException: $message is not defined
- don't drop the pear error object code and user info
All in all there are too many issues to be called for votes yet. Further, I don't see a real benefit of this class apart from saving 2 lines of code. I don't think the 400 line class doesn't deserve a standalone package, a helper class in mdb2 itself would suffice. The approach to generating SQL by defining filters is way too limited, I'd like to see a more general approach (something like Zend's DB Select shit) - but that'd require a real well-thought interface on its own and would probably not be part of this class. So a -1 from me.