Hello!
There are 7 tables, 4 of them contain a 'price' column.
It is necessary to do the following:
I need to remove from the database the names of only those tables that contain the column 'price'. And then output them separated by commas and assign the result to the variable.
I do this:
$basessites = mysql_query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='sale' AND COLUMN_NAME='price'"); if (mysql_num_rows($basessites) > 0) {$bsites = mysql_fetch_assoc($basessites); $sites = implode(",", $bsites); echo $sites; } Displays only one table of the 4 corresponding to the condition. How to be, tell me what I'm doing wrong!