quick mysql question
Posted: Tue Mar 09, 2004 12:00 pm
hi there. I'm using the following piece of code:
<?php
mysql_connect('localhost', 'root');
mysql_select_db('unreality');
$query1 = "SELECT webspace, email, forwarding, autoresponder, mtl, subdomain, database1, ftp, mailinglist, controlpanel FROM plans WHERE id = 1";
$result1 = mysql_query($query1);
while ($starter1 = mysql_fetch_row($result1)) {
print("$starter1[0], $starter1[1], $starter1[2], $starter1[3], $starter1[4], $starter1[5], $starter1[6], $starter1[7], $starter1[8], $starter1[9]");
}
?>
It works fine except that i actually need to print more colums. I have more than 10 colums that i would like to print, but mysql_fetch_row only seems to return the first 10 fields. Help would be much appreciated.
<?php
mysql_connect('localhost', 'root');
mysql_select_db('unreality');
$query1 = "SELECT webspace, email, forwarding, autoresponder, mtl, subdomain, database1, ftp, mailinglist, controlpanel FROM plans WHERE id = 1";
$result1 = mysql_query($query1);
while ($starter1 = mysql_fetch_row($result1)) {
print("$starter1[0], $starter1[1], $starter1[2], $starter1[3], $starter1[4], $starter1[5], $starter1[6], $starter1[7], $starter1[8], $starter1[9]");
}
?>
It works fine except that i actually need to print more colums. I have more than 10 colums that i would like to print, but mysql_fetch_row only seems to return the first 10 fields. Help would be much appreciated.