Re: [PHP] Good SQL builder class

2009-12-05 Thread Larry Garfield
I actually spent a great deal of time trying to make purely array based query builders, and came to the conclusion that it's not possible to make a really robust one. However, you can do it with OO and arrays. Have a look at Drupal 7 (current development version of the Drupal CMS). It include

RE: [PHP] Good SQL builder class

2009-12-04 Thread Daevid Vincent
if ($single) $sql .= ' LIMIT 1'; //echo $sql; if (count($arrays)) echo "\nsql_update() has arrays that need to be handled still: ".implode(', ', array_keys($arrays)); $result = sql_query($database, $sql, null, false);

[PHP] Good SQL builder class

2009-12-04 Thread Anton Heuschen
Good day. I'm looking for a good class to handle building dynamically from and array (and if it is good it will automatically determine / or even have different methods) to handle mutli-dimensional arrays or simple associative arrays ... and build the SQL statement : for example I have an array :