Category: PHP

Multiple SQL queries using MySQL and PHP

Multiple SQL queries using MySQL and PHP

Something that I’ve had problems with using MySQL/PHP is the limitation of only being able to run one line of SQL at a time. Using something such as Microsoft SQL Server it’s possible to write multiple lines of SQL and run it all in a single database call. Until stored procedures (in MySQL 5) are …

+ Read More

PHP 5 class constants and subclasses

PHP 5 class constants and subclasses

Another one of those ‘I wish PHP 5 did this…’ moments has occurred to me with class constants. The addition of constants is good but the problem is when it comes to subclassing. The code on the PHP 5 site: class Foo { const constant = “constant”; } echo “Foo::constant = ” . Foo::constant . …

+ Read More

PHP 5 garbage collection

PHP 5 garbage collection

The object-oriented features of PHP 5 are a really positive step forward for the language. One of the biggest improvements, to my mind, is that you no longer have to choose to pass things around by reference with a liberal smattering of ‘&’ symbols: references are now the default way of passing objects. One problem …

+ Read More