Jump to content

Selecting tables


Morsusy2k

Recommended Posts

Okay so I would need to select all tables with prefix 'c' and list their names in php.

This is how far i've come:

<?php	include 'source/connect.php';	$sql3 = "SHOW TABLES FROM mydb LIKE 'c%'";	$result3 = mysql_query($sql3) or die ("Could not access DB: " . mysql_error());	while ($row3 = mysql_fetch_assoc($result2))	{	echo $row3;        //echoes nothing,how could I echo the table name?	}?>

Also I would like if that could be done for only first 10 tables. (Only 10 tables select).

Edited by Morsusy2k
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...