You are here: Re: php mysql function examples « All PHP « IT news, forums, messages
Re: php mysql function examples

Posted by J.O. Aho on 09/28/60 11:41

VB.NET wrote:
> I was told to create functions to do my sql calls, that when when i update a
> table, i just update the functions, not all the sql calls throughout my
> code. Does anyone have any examples of this?
>
>

function something() {
$query="SELECT * FROM table1 WHERE q=1";
$result=mysql_query($query);
return $result;
}

$result=something();
while($row=mysql_fetch_array($result)) {
print_r($row);
}

 

Navigation:

[Reply to this 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

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