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
Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u c
Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like
Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website
Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",
Problem with PHP/mySQL login code
Hello,
There is an error in my login script and I can't figure out what it is...
I believe
Question about the upload of large files
Hi there,
I have a question about the upload of large files, like videos (files generally abo
Hardcopy printing is to wide
I want to make a hardcopy at runtime of my active form like this
PHP Thumbnail Creation
Ok so i use this function to create thumbnails:
Code: function createthumb($name,$filename,$n
Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system
Say I go to h
Hit counter updating once per IP - IP HIT COUNTER
I have a hit counter, for the amount of views on a tutorial.
It'll do the query and then do..