File manager - Edit - /home/cipherteam/htdocs/cipherteam.in/admin/API/GetSolutions.php
Back
<?php if(isset($_GET['TYPE'])) { require_once("Connection.php"); $type = $_GET['TYPE']; $vehicle = $_GET['VEHICLE']; if($type == "ALL") { $sql = "SELECT `solu_type_table`.`solution_id` AS 'ID',`solu_type_table`.`solution_name` AS 'NAME',`solu_type_table`.`solution_desc` AS 'DESC',`solu_type_table`.`solution_duration_month` AS 'DURA',`solu_type_table`.`pic` AS 'PIC',`solu_type_table`.`solution_type` AS 'TYPE',`solu_type_price`.`price` AS 'PRICE' FROM `solu_type_table`,`model_master_table`,`vehicle_table`,`solu_type_price` WHERE `solu_type_table`.`solution_id` = `solu_type_price`.`solution_id` AND `solu_type_price`.`vc_id` = `model_master_table`.`vehicle_cat` AND `model_master_table`.`model_id` = `vehicle_table`.`mo_id` AND `vehicle_table`.`vehicle_id` = $vehicle"; } else { $sql = "SELECT `solu_type_table`.`solution_id` AS 'ID',`solu_type_table`.`solution_name` AS 'NAME',`solu_type_table`.`solution_desc` AS 'DESC',`solu_type_table`.`solution_duration_month` AS 'DURA',`solu_type_table`.`pic` AS 'PIC',`solu_type_table`.`solution_type` AS 'TYPE',`solu_type_price`.`price` AS 'PRICE' FROM `solu_type_table`,`model_master_table`,`vehicle_table`,`solu_type_price` WHERE `solu_type_table`.`solution_id` = `solu_type_price`.`solution_id` AND `solu_type_price`.`vc_id` = `model_master_table`.`vehicle_cat` AND `model_master_table`.`model_id` = `vehicle_table`.`mo_id` AND `vehicle_table`.`vehicle_id` = $vehicle AND `solu_type_table`.`solution_type` = '$type'"; } $rows = $con->query($sql); if($rows->num_rows > 0) { $Solutions["Solutions"] = array(); while($row = $rows->fetch_assoc()) { $Solution = array(); $Solution = $row; array_push($Solutions["Solutions"],$Solution); } $Solutions["success"] = 1; } else { $Solutions["success"] = 0; } echo json_encode($Solutions); } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.2.9 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings