Hi Hacook,

> I have a mySQL database called "srchresult"  in a "srchresult" base.
> In it, i have 9 fields. Everything works perfectly.
> I would like to know how can  i list in a HTML table 30 results for
> but only with 7 columns (7 fields only) ?

Try this:


// open the db connection - replace these with your own settings
$db = mysql_connect([server], [username], [password]);

// select the database - replace with your own
mysql_select_db([database], $db);

// get the query - add your own field names here
$q = mysql_query("SELECT Field1, Field2, Field3 FROM srchresult LIMIT 30");

// start the table
echo "<table">;

// loop through the results
while ($r = mysql_fetch_array($q)) {

  // echo a table row

// end of while() loop

// finish the table
echo "</table>";


It's untested - shout if it doesn't work.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to