MYSQL gen help
Posted on
16th Feb 2014 07:03 pm by
admin
This is my Mysql gen. can anyone tell me why this echos
MID(networkset.networkid, 3, 3) AS "MNC" SELECT FROM scan JOIN gps ON scan.gpsid = gps.gpsid JOIN gsmscanset ON scan.scanid = gsmscanset.scanidJOIN gsmcell ON gsmscanset.cellid = gsmcell.cellid WHERE scan.typeid = 4 AND gsmcell.cellid = gsmcell.servingcellid
and not
SELECT MID(networkset.networkid, 3, 3) AS "MNC" FROM scan JOIN gps ON scan.gpsid = gps.gpsid JOIN gsmscanset ON scan.scanid = gsmscanset.scanidJOIN gsmcell ON gsmscanset.cellid = gsmcell.cellid WHERE scan.typeid = 4 AND gsmcell.cellid = gsmcell.servingcellid
heres the code:
$arr = array($date,$time,$latandlong,$satdata,$MCC,$MNC,$MCCMNC,$name,$callid,$lac,$bsic,$arfcn,$relvl,$c1,$c2,$rxq,$timing,$numres,$audio,$video,$image);
function select($arr){
foreach ($arr as $key => $value) {
if (is_null($value)) {
unset($arr[$key]);
}
}
$last_item = end($arr);
$last_item = each($arr);
reset($arr);
foreach($arr as $key => $value){
if($value == $last_item['value'] && $key == $last_item['key']){
echo ',';
}
print $value;
}
}
//echo '
';
/* FROM */
$fromdefault1=" scan JOIN gps ON scan.gpsid = gps.gpsid";
$fromdefault2=" JOIN gsmscanset ON scan.scanid = gsmscanset.scanid";
$fromdefault3="JOIN gsmcell ON gsmscanset.cellid = gsmcell.cellid";
/* WHERE */
$wheredefault="scan.typeid = 4 AND
gsmcell.cellid = gsmcell.servingcellid";
if (isset($datebetween, $dateand)){$datesearch=' AND DATE(gps.date) BETWEEN '.$datebetween.' AND '.$dateand.'';}
if (isset($timebetween, $timeand)){$timesearch=' AND DATE(gps.time) BETWEEN '.$timebetween.' AND '.$timeand.'';}
if (isset($timebetween, $timeand)){$timesearch=' AND DATE(gps.time) BETWEEN '.$timebetween.' AND '.$timeand.'';}
if (isset($lat, $long)){$latandlongsearch=' AND DATE(gps.time) BETWEEN '.$lat.' AND '.$long.'';}
/* Query */
$query = "
SELECT ".select($arr)."
FROM ".$fromdefault1.$namefrom.$fromdefault2.$fromdefault3.$numresform1.$numresform2.$audiofrom.$videofrom.$imagefrom."
WHERE ".$wheredefault.$datesearch.$timesearch.$latandlongsearch . "
";
echo $query;
}
Thank
No comments posted yet
Your Answer:
Login to answer
204
14
Other forums
Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q
Not Inserting into DB
I can't get my Add new Division form to submit to the database. Anyone see my issue?
Code: &a
POST into Array problem
Hi Chaps,
I have a repeat region, displaying rows of data: jobid, fromtable, translatorcharge
Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem:
I have below button declaration in markup of the aspx page:
how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s
set xml path in flash when xml created in memorystream and webrequest
i am creating an xml file using memory stream and i want to load this xml file into the flash on cli
Effort Estimation Template for Steady State Support
Hi Everyone,
Is there any SAP provided template/format for system change and enhancements
PHP Function Page Advice
Hi All, I am quite new to PHP and Javascript but have written an Online Shop (Mainly for Fun and edu
Renaming array keys
The issue: renaming array keys inside a foreach loop.
I'm trying to build a pie chart image w
How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:
www.site.co