PHP mysqli support
| From: | Jacob Kruger | Date: | Fri, 24 Feb 2012 14:47:53 +0000 |
| Subject: | PHP mysqli support | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-30788@lists.php.net to get a copy of this message | ||
Ok, turns out, after double checking my servers mysqli support using phpinfo(), and doing a bit more
research, and finding the following bit of introductory/instructional/tutorial material, relating to
the mysqli PHP extension, on the php.net site itself, that other sample code I had found a little
while back was just incorrect syntactically itself - making use of object oriented coding/approach,
but excluding necessary keywords, like new, etc., but anyway:
http://www.php.net/manual/en/intro.mysqli.php
In other words, whereas it had said:
$sql = mysqli("hostName", "user", "password", "database");
it should in fact have stated:
$sql = new mysqli("hostName", "user", "password",
"database");
That meant you could then access properties and methods of the then instantiated mysqli object using
the -> operator, so, for a simple example of a statement, instead of mysqli_close($sql); it would
instead read $sql->close();
In other words, it primarily makes use of an object oriented approach to database
integration/manipulation, instead of the simple, procedural only approach of just calling functions
all the time, but anyway.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'