[PHP-DB] general rule for when to perform an operation in either Mysql or php

2006-01-29 Thread daniel smith
I am playing around with Mysql and php and I am not sure about when it is best do something in mysql or php when BOTH can perform the operation. Example, date formating can be performed by Mysql during the query DATE_FORMAT(blah, blah...) or by php with date(blah, blah..). What are the upsides/do

[PHP-DB] Multiple inserts into a database

2006-11-30 Thread Daniel Smith
The kind of thing I'm looking to do is to insert a variable number of records into a database as a consequence of a form entry. I am using PHP with a MySQL database to store information that is vaguely analogous to a fast food online ordering system. I have a table containing individual items with

Re: [PHP-DB] Multiple inserts into a database

2006-12-01 Thread Daniel Smith
> select itemname from deals d, items i, deal_items di where > d.dealid=di.dealid and i.itemid = di.itemid and dealname="meal 1"; Would I be correct in thinking that the above is in effect the same as: select itemname from deals, items, deal_items where deals.dealid=deal_items.dealid and item