06-18-2017, 12:29 PM
I'm not sure what you mean because UserSpice already has functions , , and . See documentation.
It's not called ADD but INSERT and it doesn't have a WHERE clause. See SQL tutorial.
===
With this patch you can already use nested triads for. For example:
I've noticed that the query is still being run even if the argument was incorrect. This is also the case with the original DB.php. For example: is going to clear the table. To fix it I've added an error flag. Lines 86-91, 98, 159, 186 in my paste.
Passing empty array is now prohibited (line 195).
===
Statement UPDATE uses WHERE clause so I might as well implement triads. Lines 239-253 in my paste. Now you can do this:
Code:
update()
Code:
insert()
Code:
delete()
It's not called ADD but INSERT and it doesn't have a WHERE clause. See SQL tutorial.
===
With this patch you can already use nested triads for
Code:
delete()
Code:
$db->delete("Products", ["or", ["Stock","<=",0], ["Legal","=",false]]);
I've noticed that the query is still being run even if the argument was incorrect. This is also the case with the original DB.php. For example:
Code:
delete("Products",NULL)
Passing empty array is now prohibited (line 195).
===
Statement UPDATE uses WHERE clause so I might as well implement triads. Lines 239-253 in my paste. Now you can do this:
Code:
$db->update("Suppliers", ["Country","=","Greece"], ["Currency"=>"GRD"]);