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
Change of partner analyse in sales orders
Hello,
insert quotes
Hi,I have an output like this:Code: john,18,CancerHow can I change this to Code: 'john','18','Cancer'with php?Thanks in advanced,
Retail terminologys not been altered after activing Retail System
Hi, All
strptime() equivalent for php4 ?!
Greetings!this is my first post, thank you in advance for your replies. Well, the title says it all, is there an equivalent of the function strptime() for php4 ? I want to parse a timestamp like this
error checking breaking my code
Hi there, OK first of all, big apologies for what I assume is really fundamental errors in the structure of my code. I'm really new at this and still learning, but I'm almost at the stage of giving up
Multithreading design
HiI have come up with a Singleton class that manages a pool of database connections. Basically the pool is a queue in which I have stored some connection objects. When ever a client calls any of the
breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this: abcd@gmail.comfefef@mail.comfefefef@yahoo.comfewferf@mail.net...What I want to do is insert a paragraph after
Something Non-Traditional. Can we solve?
I have an idea for an application here. It's mostly flash, but it couldn't work without a somewhat non-traditional php functionality.here's the thing:I want to have a function which returns an
mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts??? this is the code i got from a tutorial :Code: [Select]<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase
PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page will use code to pull information from a database and display it on the page in a formatted way.Code: