This topic is locked

Flile_list.php available.

9/2/2008 1:34:15 PM
PHPRunner General questions
M
maxcolo author

Hi,

sorry for my poor english but I italian user.

I have one table name "prenotazioni" and one field name "table" (es. table25,table26,table27 etc).

In another table name "table" I have the tables list.

I wont see in the table_list.php only the record of the table without reservation, what is the code function "before list" to put in the event.

I hope of being be clear

Best regards

Massimo

J
Jane 9/3/2008

Hi,
I suppose you need to display all records in the Table table which are not in the prenotazioni table.

In this case use List page: Before SQL query event on the Events tab.

Here is just a sample:

global $conn;

$reserved_tables = "";

$str = "select FieldName from prenotazioni";

$rs = db_query($str,$conn);

while($data = db_fetch_array($rs))

$reserved_tables.=$data["FieldName"].",";

$reserved_tables = substr($reserved_tables,0,-1);
$strWhereClause = whereAdd($strWhereClause," table not in (".$reserved_tables.") ");