Need help urgant
Posted on
16th Feb 2014 07:03 pm by
admin
why down my code ony return one item instead of all the items selected.
$arr = array($date,$time,$latandlong,$satdata,$MCC,$MNC,$MCCMNC,$name,$callid,$lac,$bsic,$arfcn,$relvl,$c1,$c2,$rxq,$timing,$numres,$audio,$video,$image);
foreach ($arr as $key => $value) {
if (is_null($value)) {
unset($arr[$key]);
}
}
function select($array){
$last_item = end($array);
$last_item = each($array);
reset($array);
foreach($array as $key => $value){
if($value == $last_item['value'] && $key == $last_item['key']){
echo ',';
}
return $value;
}
}
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 = 'SELECT '.select($arr).'
FROM '.$fromdefault1.$namefrom.$fromdefault2.$fromdefault3.$numresform1.$numresform2.$audiofrom.$videofrom.$imagefrom.'
WHERE '.$wheredefault.$datesearch.$timesearch.$latandlongsearch . ' ';
/* Query */
echo $query;
}
thank you!
No comments posted yet
Your Answer:
Login to answer
109
37
Other forums
Object Interfaces
EDIT: Never mind, I just updated to php 5.
Hey all,
I'm currently experimenting with p
Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor
help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when
help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?
I was thinking s
generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q
Get last modified date of web page
Hai All,
In php how can i get last modified date of a give web page . I have tried to g
Greek characters in php
Hi,
I'm making a script and I m using for first time greek characters.
I started to write
output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish
big pagination problem in php
<?php
$connect = mysql_connect("localhost", "root", "")
Stopped working!
So I had to change some stuff, none of it major. Stuff like the extension_dir and such. BEFORE I did