| trew |
|---|
buuza,
SELECT t2.Status
FROM tblItem t1
INNER JOIN tblBooking t2
ON t1.ResNum= t2.ResNum
WHERE t1.itemId = 174
|
Спасибо, щас попробую..
вот задание если интересно))
<?php
require_once("common.php");
/*
There's a table called tblBooking another one called tblItems .
tblBooking has a field called 'Status' and another called 'ResNum'
tblItem has a field called 'ResNum' and another called 'ItemID'
What I need you to create, is a <form> where you input the 'ItemID' and returns the status of the Reservation (located in tblBooking.Status).
There's a function that already connects to the database and returns the results ( sql_cover() ). Use it , It's loaded already in this script
Here are some item id's for you to test: 687863 (shows OK) , 228 (shows CX) , 1020 (shows OK), 174 (shows CX)
*/
//EXAMPLE OF sql_cover USAGE
$query='select * from tblBooking limit 5';
$result = sql_cover($query, "select", 0, 0, 0, 0);