Forum Moderators: coopster

Message Too Old, No Replies

Listing tables

I want to list tables but they must contain a specific word

         

raulwg

2:01 am on Jun 23, 2005 (gmt 0)

10+ Year Member



Hai there,

I want to list a few tables from my database, but only the ones containing the word "round*" as a tablename. So far I have this, and this will give all the tables in database. How do I build in this query?

$result = mysql_list_tables($database);
$num_rows = mysql_num_rows($result);
for ($i = 0; $i < $num_rows; $i++)
{
echo "Table: ",mysql_tablename($result, $i), "<br>";
}

Thx in advance, Raúl

dreamcatcher

7:23 am on Jun 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



SELECT * FROM table WHERE tablename = 'round';

raulwg

3:39 pm on Jun 23, 2005 (gmt 0)

10+ Year Member



Thanks for your reply dreamcatcher, but it still doesn't work for me. Don't exactly know how to apply the query you supposed.