Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
Darrell3831
Worker
Worker



Joined: Feb 18, 2004
Posts: 244

PostPosted: Wed Feb 25, 2004 11:41 am Reply with quote

In the 6.9 version 2.1 patches released by chatserv, there are many good tips. I'd like to ask why about one of them.

Chatserv suggests this:

Code:
$row = $db->sql_fetchrow($result);

$rid = intval($row['rid']);
$name = $row['name'];
$url = stripslashes($row['url']);


In place of this:

Code:
list($rid, $name, $url) = $db->sql_fetchrow($result);

$rid = intval($rid);
$url = stripslashes($url);


What are the advantages of using the first method over the second?

Thanks,
Darrell

_________________
http://www.psy-center.com 
View user's profile Send private message Visit poster's website
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Wed Feb 25, 2004 3:28 pm Reply with quote

Don't worry too much about that one, both are basically the same, the first one is just how the new abstraction layer defines variables but you should not have any problems using either.
 
View user's profile Send private message Visit poster's website
Darrell3831







PostPosted: Wed Feb 25, 2004 6:10 pm Reply with quote

Thanks Chatserv,

I wouldnt mind switching though if there is something better, especially in terms of efficiency or security.

Darrell
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©