Thanks for this tute, it's pretty good, although, I wouldn't recommend a beginning OOPer to read that right off the bat.
I've been working with PHP OOPing for only a short time, but, as it's a daily requirement in my job, I find your stuff easier to follow than our own docs at work.
The only thing is that I have never seen anything like line 17 before.
function flowSQL($db_server = DATABASE_SERVER, $db_user = DB_USERNAME, $db_pass = DB_PASSWORD, $database = DATABASE)
is this a PHP5 thing?
I don't have access to 5 at the moment, err... scratch that.. I don't have access on the server that I am creating this for, to PHP5.
I am assuming that, this line must stay as is, however, we need to use
define('DATABASE_SERVER', 'localhost');
another item I am assuming is PHP5 which does not work in 4, as I have never seen it in a PHP4 script.
further assumption is that, if I actually did all the defines, that this would globally define these items as long as I use some require page.php.
At which point I would be able to do something like
$query = "SELECT needle FROM haystack WHERE hay = yellow";
$myQuery = new flowSQL;
$myQuery->flowSQL();
$myQuery->query($query);
or is it even needed to use the second to last line?
Thanks again for your help
Sage