Reply to Re: function to simplify data

Your name:

Reply:


Posted by windandwaves on 09/04/05 02:49

windandwaves wrote:
> Janwillem Borleffs wrote:
>> windandwaves wrote:
>>> What is the most efficient way to write such a function???
>>>
>>
>> function getdata($sql) {
>> $result = @mysql_query($sql) or die("Error: " . mysql_error());
>> $ret = array();
>>
>> while($row = mysql_fetch_assoc($result)) {
>> $ret[] = $row;
>> }
>> mysql_free_result($result);
>> return $ret;
>> }
>>
>>
>> $sql = 'SELECT `ID`, `NAM` FROM HEP ORDER BY `ID`';
>> $data = getdata($sql)
>>
>> foreach ($data as $d) {
>> $content .= '<li><a href="test.php?i='.$d["ID"].......


Does it slow things down to use proper names rather than numbers, i.e.

$d["NAM"] rather than $d[0]

Thank you again

- Nicolaas

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация