Retreving Data: one or many sql calls?

wxdqz

New Member
Does anybody know whether multiple mysql_result calls, such as the following:

(xxTmpResult being the result id from a query)

$p_key = mysql_result($xxTmpResult, 0, 'p_key');
$p_prefix = mysql_result($xxTmpResult, 0, 'p_prefix');
$p_fname = mysql_result($xxTmpResult, 0, 'p_fname');
$p_minit = mysql_result($xxTmpResult, 0, 'p_minit');
$p_lname = mysql_result($xxTmpResult, 0, 'p_lname');
$p_suffix = mysql_result($xxTmpResult, 0, 'p_suffix');
$p_phone = mysql_result($xxTmpResult, 0, 'p_phone');
$p_email = mysql_result($xxTmpResult, 0, 'p_email');
$c_key = mysql_result($xxTmpResult, 0, 'c_key');
$c_name = mysql_result($xxTmpResult, 0, 'c_name');
$c_abbr = mysql_result($xxTmpResult, 0, 'c_abbr');
$l_city = mysql_result($xxTmpResult, 0, 'l_city');
$l_state = mysql_result($xxTmpResult, 0, 'l_state');
$l_postal = mysql_result($xxTmpResult, 0, 'l_postal');
$l_country = mysql_result($xxTmpResult, 0, 'l_country');
$l_phone = mysql_result($xxTmpResult, 0, 'l_phone');
$l_email = mysql_result($xxTmpResult, 0, 'l_email');

Or would it be more efficient (speedwise) to use a mysql_fetch_array($xxTmpResult) to get all the fields into an array?

Thanks for your input
 
Back
Top