Databasic 2.1, now with more operator support!
Thursday, July 30th 2009, 5:12pm
Topics: Code, PHP
Tags: Databasic, Script, Database, Handler, Resource
Comments: 2
Permalink -
Tinylink
I got pretty bored the other day and also noticed this contest over at NetTuts, and thought to myself, "Why not enter Databasic into the contest?". Well that is my plan, but I also wanted to fix some problems and restraints in the current version. The new version supports AND/OR operators in the conditions, as well the column operators (!=, <=, etc) have been rebuilt. With this change the new version is not backwards compatible! Sorry, but it shouldn't be too hard to fix your scripts to work correctly.
Here's a quick example of the new operator support in conditions. The documentation has also been updated to reflect the new version.
Download the new 2.1!
View the full change log and features
Here's a quick example of the new operator support in conditions. The documentation has also been updated to reflect the new version.
$conditions = array(
'OR' => array(
array('name' => 'Miles'),
array('name' => 'Johnson')
),
'status' => 'active',
'age >=' => 21
);Download the new 2.1!
View the full change log and features
2 Comments
flavour2x.com
Mar 11th 2010, 20:16
Also, on PHP 5.3 (and debug on) there is a notice:
As temporary workaround I've added at 1159:
Thanks for your efforts. Very efficient and smart piece of code. Using it with great relish.
deft-designs.com
Apr 6th 2010, 03:14
There are few issues that i've noted while using your databasic class v 2.3.2.
One is with the multiple connections. Even following your example given on the following link. It does work as it should.
http://milesj.me/resources/script/database-handler#Using-Multiple-Databases
The problem is that when you connect to "db1" and set its slug to 'default' and get its instance and at the same time connect to another 'db2' set its slug to 'alternate'.
Now query a table which doesn't exist on db 1 using alternate instance
it will give a fatal error. Since the table wasn't found in the db1.
It seems like that mysql resource that the mysql_query function used was that of db1 instance 'default' slug.
Hopefully you'll be able to fix it soon and have the updated version uploaded ;-)