Re: Noobie starting to learn OOP for databases needs help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 16, 2012 at 9:38 AM, dealTek <dealtek@xxxxxxxxx> wrote:
> Noobie starting to learn oop for databases from here:

Cool. :)

> mysql_insert_id (depricated?) or mysqli_insert_id() (I am using mySql 5.3)

The mysqli version would be preferred, since you're using mysqli in that class.

> 2 - how does one do aggrigate select queries like "SELECT SUM(price) FROM mytable" ... what I tried seemed to fail...

Problem there is that the query method forces everything through
prepare, and you don't have a preparable statement. I'd write another
method for such single values where you won't sent it through
prepare/execute/bind, and just suck in the value and return it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux