我正在写这个Api而且我已经被困了一天但是我无法找到错误,当我在rest api客户端上测试并给出min_value = 1000和max_value = 5000而不是去特定的elseif时,它进入错误的状态。我附加了我的代码和我的SQL数据库。请找到错误,虽然我看不到任何错误。以下是我的api
<?php
error_reporting(E_ALL);
mysql_connect("localhost", "propeqgq_rida145", "fatima")
or die(mysql_error());
mysql_select_db("propeqgq_myDB") or die(mysql_error());
echo $type=$_GET["type"];
echo $min_price=$_GET["min_price"];
echo $max_price=$_GET["max_price"];
echo $purpose=$_GET["purpose"];
echo $area=$_GET["area"];
echo $user_id=$_GET["user_id"];
$sql="SELECT * FROM `property_details` where price between '$min_price' and '$max_price' and type='$type' and purpose='$purpose' and area='$area'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));}
}
//all null
elseif($min_price=="" && $max_price=="" && $type=="" && $purpose=="" && $area==""){ echo "testing all null";
$sql="SELECT * FROM `property_details";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($type==NULL)){
echo "testing type condition";
$sql="SELECT * FROM `property_details` where type='$type'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));;
}
}}
elseif(!($min_price==NULL)){
echo "testing min conditon ";
$sql="SELECT * FROM `property_details` where price>='$min_price'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}
}
}
elseif(!($max_price==NULL)){ echo "testing max conditon ";
$sql="SELECT * FROM `property_details` where price<='$max_price'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}
}}
elseif(!($purpose==NULL)){ echo "testing purpose conditon ";
$sql="SELECT * FROM `property_details` where purpose='$purpose'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($area==NULL)){ echo "testing area conditon ";
$sql="SELECT * FROM `property_details` where area='$area'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($max_price==NULL && $min_price=NULL)){
echo "testing min and max conditon";
$sql="SELECT * FROM `property_details` where price between $min_price and $max_price";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}} }
elseif(!($area==NULL && $purpose==NULL)){
echo "testing purpose + area conditon ";
$sql="SELECT * FROM `property_details` where area='$area' and purpose='$purpose'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}} }
elseif(!($min_price==NULL && $purpose==NULL)){
echo "testing min+purpse conditon ";
$sql="SELECT * FROM `property_details` where price>='$min_price' and purpose='$purpose'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($max_price==NULL && $purpose==NULL))
{ echo "testing max+purpose conditon ";
$sql="SELECT * FROM `property_details` where price<='$max_price' and purpose='$purpose'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($type==NULL && $area==NULL)){ echo "testing type+area conditon ";
$sql="SELECT * FROM `property_details` where type='$type' and area='$area'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($type==NULL && $area==NULL && $purpose==NULL)){ echo "testing tcype+area+purpose onditon ";
$sql="SELECT * FROM `property_details` where type='$type' and area='$area' and purpose='$purpose'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));
}}}
elseif(!($type==NULL && $area==NULL && $min_price==NULL)){ echo "testing type+area+min conditon ";
$sql="SELECT * FROM `property_details` where type='$type' and area='$area' and price>='$min_price'";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('userId'=>$row[0],'title'=>$row[1],'price'=>$row[2]
,'area'=>$row[3],'details'=>$row[4], 'purpose'=>$row[5] , 'type'=>$row[6] , 'image'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , ));}
}} //favorite thing
/* elseif(!($user_id==NULL)){
$sql="select property_details_id,user_id,property_details.tittle,property_details.price,
property_details.area,property_details.details,property_details.purpose,property_details.type,
property_details.longitude,property_details.latitude,property_details.baths,property_details.room,
property_details.image from favorite join property_details on property_details.id=property_details_id where user_id=$user_id ";
$query=mysql_query($sql);
$total_record=mysql_num_rows($query);
$response["status"] = false;
$dat = array();
if($total_record>0){
while($row=mysql_fetch_array($query))
{
$response["status"] = true;
array_push($dat,array('property_details_id'=>$row[0],'user_id'=>$row[1],'tittle'=>$row[2]
,'price'=>$row[3],'area'=>$row[4], 'details'=>$row[5] , 'purpose'=>$row[6] , 'type'=>$row[7] , 'longitude'=>$row[8] , 'latitude'=>$row[9] ,'baths'=>$row[10] , 'rooms'=>$row[11] , 'image'=>$row[12] , ));}
}} */
else
{
$response["status"] = false;
}
$response["buysell_data"] = $dat;
echo json_encode($response);
?>
我的数据库sql查询
Database sql
-- MySQL dump 10.13 Distrib 5.6.23, for Win64 (x86_64)
--
-- Host: localhost Database: property_zone
-- ------------------------------------------------------
-- Server version 5.6.17
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `favorite`
--
DROP TABLE IF EXISTS `favorite`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `favorite` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`property_details_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_favorite_user_idx` (`user_id`),
KEY `fk_favorite_property_details1_idx` (`property_details_id`),
CONSTRAINT `fk_favorite_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `fk_favorite_property_details1` FOREIGN KEY (`property_details_id`) REFERENCES `property_details` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `favorite`
--
LOCK TABLES `favorite` WRITE;
/*!40000 ALTER TABLE `favorite` DISABLE KEYS */;
INSERT INTO `favorite` VALUES (1,1,1),(2,1,2),(3,2,3),(4,2,4),(5,2,5),(6,2,6),(7,1,7);
/*!40000 ALTER TABLE `favorite` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `kitchen_image`
--
DROP TABLE IF EXISTS `kitchen_image`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `kitchen_image` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`image1` varchar(45) NOT NULL,
`image2` varchar(45) NOT NULL,
`image3` varchar(45) NOT NULL,
`image4` varchar(45) NOT NULL,
`image5` varchar(45) NOT NULL,
`user_id` int(11) NOT NULL,
`property_details_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_kitchen_image_user1_idx` (`user_id`),
KEY `fk_kitchen_image_property_details1_idx` (`property_details_id`),
CONSTRAINT `fk_kitchen_image_property_details1` FOREIGN KEY (`property_details_id`) REFERENCES `property_details` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `fk_kitchen_image_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `kitchen_image`
--
LOCK TABLES `kitchen_image` WRITE;
/*!40000 ALTER TABLE `kitchen_image` DISABLE KEYS */;
INSERT INTO `kitchen_image` VALUES (1,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',2,7),(2,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',2,8),(3,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',2,9);
/*!40000 ALTER TABLE `kitchen_image` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `outer_image`
--
DROP TABLE IF EXISTS `outer_image`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `outer_image` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`image1` varchar(45) NOT NULL,
`image2` varchar(45) NOT NULL,
`image3` varchar(45) NOT NULL,
`image4` varchar(45) NOT NULL,
`image5` varchar(45) NOT NULL,
`user_id` int(11) NOT NULL,
`property_details_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_outer_image_user1_idx` (`user_id`),
KEY `fk_outer_image_property_details1_idx` (`property_details_id`),
CONSTRAINT `fk_outer_image_property_details1` FOREIGN KEY (`property_details_id`) REFERENCES `property_details` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `fk_outer_image_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `outer_image`
--
LOCK TABLES `outer_image` WRITE;
/*!40000 ALTER TABLE `outer_image` DISABLE KEYS */;
INSERT INTO `outer_image` VALUES (1,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',2,4),(2,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',1,5),(3,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',1,6);
/*!40000 ALTER TABLE `outer_image` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `property_details`
--
DROP TABLE IF EXISTS `property_details`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `property_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tittle` varchar(45) NOT NULL,
`price` varchar(45) NOT NULL,
`area` varchar(45) NOT NULL,
`details` varchar(45) NOT NULL,
`purpose` varchar(45) NOT NULL,
`type` varchar(45) NOT NULL,
`longitude` varchar(45) NOT NULL,
`latitude` varchar(45) NOT NULL,
`baths` varchar(45) NOT NULL,
`room` varchar(45) NOT NULL,
`image` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `property_details`
--
LOCK TABLES `property_details` WRITE;
/*!40000 ALTER TABLE `property_details` DISABLE KEYS */;
INSERT INTO `property_details` VALUES (1,'House 1','1000','10','very nice','sale','house','72','20','4','4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(2,'very nice must try','2000','5','do visit','sale','house','72','65','2','2','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(3,'house 3','3000','3','try it ','rent','plot','45','52','3','3','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(4,'house 4','4000','4','newly opened','sale','rent','14','25','3','3','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(5,'house5','5000','6','newly opened','rent','House','45','65','1','4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(6,'house6','6000','7','my sweet home','sale','Plot','74','85','3','6','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(7,'house7','7000','6','for sale','sale','Plot','45','21','3','3','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(8,'house8','8000','11','my villa','rent','House','33','66','2','5','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(9,'house9','9000','6','sweet home','sale','house','33','66','3','7','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4'),(10,'house10','10000','4','pehe aye pehle paye','rent','house','32','25','5','5','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4');
/*!40000 ALTER TABLE `property_details` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `room_image`
--
DROP TABLE IF EXISTS `room_image`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `room_image` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`image1` varchar(45) NOT NULL,
`image2` varchar(45) NOT NULL,
`image3` varchar(45) NOT NULL,
`image4` varchar(45) NOT NULL,
`image5` varchar(45) NOT NULL,
`user_id` int(11) NOT NULL,
`property_details_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `fk_room_image_user1_idx` (`user_id`),
KEY `fk_room_image_property_details1_idx` (`property_details_id`),
CONSTRAINT `fk_room_image_user1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `fk_room_image_property_details1` FOREIGN KEY (`property_details_id`) REFERENCES `property_details` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `room_image`
--
LOCK TABLES `room_image` WRITE;
/*!40000 ALTER TABLE `room_image` DISABLE KEYS */;
INSERT INTO `room_image` VALUES (1,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit1','C:\\Users\\Usman\\Desktop\\backgrounds\\kit2','C:\\Users\\Usman\\Desktop\\backgrounds\\kit3','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit5',1,1),(2,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',1,2),(3,'C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4','C:\\Users\\Usman\\Desktop\\backgrounds\\kit4',1,3);
/*!40000 ALTER TABLE `room_image` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `signin_details`
--
DROP TABLE IF EXISTS `signin_details`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `signin_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL,
`password` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `signin_details`
--
LOCK TABLES `signin_details` WRITE;
/*!40000 ALTER TABLE `signin_details` DISABLE KEYS */;
/*!40000 ALTER TABLE `signin_details` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `user`
--
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(45) NOT NULL,
`email` varchar(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `user`
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'saad','saad@gmail.com'),(2,'rida','rida@gmail.com');
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-05-08 0:15:40