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
Need help/w Page: 1,2,3,4 function!
So I have this code im working on where it's ment to display seperate pages having 20 logs each
I
Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on
url- go to webpage
i have an input text field and submit button.
how do i make the url entered into the textfiel
Storing Values taken from a DB...
Using this code it will generate a short list from my database
<?php
mysql_connect
Error when call dll from oracle
Hi all, please help me!
I have dll write C language, I want call it from oracle procedur
standard ALV application toolbar, into custom report....
HI,
I have a question regarding displaying standard ALV menu path and application toolbar
upload control not working with update panel
Hi,
I am working with Asp.Net FileUpload control with ajax update panel,
if i use the
What makes a script your own?
If someone finds a login script online, and changes some variable names around and some other minor
foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh
Php WordPress help
I am writing the following code for making a plugin
<?php
header("Content-Type