Posted by Parrot on 11/03/05 23:42
On 3 Nov 2005 12:57:34 -0700, yf110@vtn1.victoria.tc.ca (Malcolm
Dew-Jones) wrote:
>
>We need to see your code to debug the error or misunderstanding.
>
Okay:
function maincats()
{
global $datHost;
global $datUser;
global $datPass;
global $datName;
$db1 = mysql_connect($datHost,$datUser,$datPass) or die
("Unable to connect: ". mysql_error());
mysql_select_db ($datName);
$qstr="select * from categories where parent_id='0'";
$qry=mysql_query($qstr) or die ("Unable to set query:
$qstr<BR>". mysql_error());
$count = 0;
while($arr=mysql_fetch_array($qry))
{
$cat[$count][0] = $arr['cat_id'];
$cat[$count][1] = $arr['name'];
$count += 1;
}
return $cat;
}
Navigation:
[Reply to this message]
|