Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.23.101.75
<?php
/*
* Api For sending result sms through web export after uploading the result
*
url == http://oasis.logisys.org/sms/admission_sms_push.php?funivcode=041&fdbname=logisys3_bcu
*
*/
ini_set('memory_limit','900M');
ini_set('max_execution_time',0);
include("/var/www/config.php");
//connect to database
// $servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
// $username = "admin";
// $password = "Logisys2104";
$servername = SERVERNAME;
$username = USERNAME;
$password = PASSWORD;
$conn = new mysqli($servername,$username,$password);
if(!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$commondb = "logisys3_comexam";
// Will be sent by mohan sir through web export
$univcode = trim($_GET['funivcode']);
$query = "select FDBNAME from {$commondb}.dbname where funivcode = '{$univcode}'";
$res = mysqli_query($conn, $query);
$row = mysqli_fetch_assoc($res);
$query1 = "delete from logisys3_comexam.pushstud where funivcode='{$univcode}' and ifnull(fusertype, '900')='900'";
$res = mysqli_query($conn, $query1);
$sql1 = "insert ignore into logisys3_comexam.pushstud
select '{$univcode}', TRIM(fregno), TRIM(fdegree), TRIM(fcollcode), TRIM(fname), fsex, fdob, NULL, NULL, fcaste, TRIM(ffatname), TRIM(fmotname),'900', ''
from {$row['FDBNAME']}.student";
// var_dump($sql1);die();
$result1 = mysqli_query($conn, $sql1);
if($result1)
{
echo "success";
}
else
{
echo "failure";
}
?>
|