Re: [PHP-DB] in-line function?
Leif K-Brooks wrote: Ohhh.. sorry for that. it's quite simple, i'm wondering if we can have something like those in-line functions in C++: class someCLASS { var $varLength; // other stuff inline function length() { return $this->varLength; } } i expect it will make PHP script speed up a bit, coding easier, etc... but not sure it will do or not. :) What would be the difference (besides putting the word "inline" in front of the function)? i'm not quite sure, so correct me if i'm wrong. in C++ definition, a length() statement, in this example, will be replaced directly by the value of $this->varLength at runtime, instead of passing control to the length() function, returning the value, exit and then returning control to up process. -- // Donny -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] in-line function?
Matthew Horn wrote: > Donny wrote: >> can we make simple codes "in-line" instead of function >> calls? >> or, it makes no help in PHP? > Donny, can you please explain what you mean by this, perhaps > with a code sample? I am not really sure what you are asking. Ohhh.. sorry for that. it's quite simple, i'm wondering if we can have something like those in-line functions in C++: class someCLASS { var $varLength; // other stuff inline function length() { return $this->varLength; } } i expect it will make PHP script speed up a bit, coding easier, etc... but not sure it will do or not. :) -- // Donny -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] in-line function?
hi there, can we make simple codes "in-line" instead of function calls? or, it makes no help in PHP? -- // Donny -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] resetting $res from mysql_fetch_row()?
John W. Holmes wrote: >>any hint on resetting a $res from mysql_fetch_row()? > www.php.net/mysql_data_seek Thanks, does help. -- // Donny -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] resetting $res from mysql_fetch_row()?
hi there, any hint on resetting a $res from mysql_fetch_row()? my sample code is something like this: $res = mysql_query( . ) or die ("Query failed"); while ( list ( $gid, $pSubSetName) = mysql_fetch_row($res) ) { print "$gid - $pSubSetName" } : while ( list ( $gid, $pSubSetName) = mysql_fetch_row($res) ) { print "$gid - $pSubSetName" } the 1st while works fine, but not the 2nd one. I geuss there should be something like resetting the internal pointer between the 2 while loops? -- // Donny -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php