I never studied or worked much with PHP. VBA/SQL and database design and development is my field. I'm trying to reverse engineer a bit of PHP code for a mobile app my client had commissioned as a front end to a MySQL database.
There's a calling function as follows. I'm trying to figure out how to identify what table or view these fields are coming from. I can post the db_function.php code if necessary. Thanks for your help and patience.
(I hope the php code tags worked ok - I don't see any formatting when previewing
Code: Select all
<?php
include('db_function.php');
$db = new db_function();
$CUST_ID = $_REQUEST['cust_id'];
$PRO_NO = $_REQUEST['pro_no'];
if(!empty($CUST_ID) && !empty($PRO_NO))
{
$result = $db->getEquipments($CUST_ID,$PRO_NO);
if($result != '')
{
$response["success"] = 1;
$response["message"] = "Successfully fetched equipments!";
$response["equipments"] = $result;
}
else
{
$response["success"] = 0;
$response["message"] = "No Records";
}
}
else
{
$response["success"] = 0;
$response["message"] = "Required fields are missing!";
}
echo json_encode($response);
?>