Struggling with this one.. my sql query works in PHP myAdmin but not on the page..
The url: http://www.copleycaravanservices.co.uk/Caravans.php?room_id=1&foreign_id=1 There is also another query which works for the room_id section of the url
The code that isnt working:
<?php
require_once('db_config.php');
mysql_select_db($dbname, $db);
$sql1 = "SELECT * FROM `SS_hotel_booking_multi_lang`
WHERE `foreign_id` = " . $_GET['foreign_id'] . "
AND `locale` = '1'
AND `field` = 'description'
AND `source` = 'data'";
$result1 = mysql_query($sql1, $db) or die(mysql_error());
$CaravanDesc = mysql_fetch_assoc($result1);
?>
The database: (Hope this displays correctly!)
id foreign_id model locale field content source
7365 1 pjRoom 1 name Promenade 654 data
7366 1 pjRoom 1 description This caravan sleeps 6 data
7371 2 pjRoom 1 name Butlins Sandhills 14 data
7372 2 pjRoom 1 description 4 Day Passes included data