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]
|