quick mysql question

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
shadow_blade47
Forum Newbie
Posts: 12
Joined: Fri Nov 07, 2003 3:41 am

quick mysql question

Post by shadow_blade47 »

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.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

You only appear to be selecting 10 fields in your SELECT query..or am i missing something?
Post Reply