Can't seem to get it to work, here is the code I am using just to dump the tablenames into a listing. Figure I would start simple to make sure things work before dumping it into a while loop with <TABLE> setups.
can you see what I am doing wrong to select the tablenames that just start with G then dump that into a table. this is giving me a parse error, think it is due to what I am calling 'names' in the printf statement, any ideas?
<?php
$db = mysql_connect("hostname","username","password") or DIE("Sorry, couldn't con
nect");
mysql_select_db("database",$db);
$result = mysql_list_tables("database");
while ($i < mysql_num_rows ($result)) {
$names[$i] = mysql_tablename ($result,$i);
//echo $names[$i] . "<BR>";
$i++;
} do {
$result1 = mysql_query("SELECT * FROM $names[$i] WHERE $names[$i]='G%'");
while ($row = mysql_fetch_array($result1)) {
printf("<TR>%s</TR>\n", $row[names]);
}
?>
thanks,
/frank