View Single Post
Old 01-29-2013, 09:23 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Neither of those will work in PHP. The first is probably supposed to be =& which can be done in PHP, but you cannot dereference with * as that syntax isn't available in PHP (or more accurately, you cannot get the pointer directly in PHP, you can only retrieve the value, or assign the pointer through direct assignments in PHP).

PHP uses object instance pointers, which are *kinda* like pointers. They're not the same though. For most typical work, these are *mostly* synonymous in PHP 5 (php 4 is a different story):
PHP Code:
$obj $objArray['anObject'];
// and
$obj = &$objArray['anObject']; 
Changes to $obj in either reflect changes to both the $obj and the 'anObject' within the array. Where the second one would differ is on the destruction of the object itself since they share the same object instance pointer, but not the same pointer itself. The first would be an object pointer to an object pointer.

Now this all said, for what reason do you need to issue an alter command? Typically speaking, with the exception of installation process, you shouldn't need to ever issue a CREATE, DROP or ALTER SQL command in a project.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote