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
Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit
Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si
PHP Directory Listing Not working
Hey Guys,
I need help, I tried a ton of directory listing scripts and they all don't work. Al
Storing/displaying image urls in a database?
Hi
Basically I have the following scenario:
User chooses picture from list. Picture info is ad
how can i make a .gif images for my site
Dear Friends ,
Pls solve my problem , I am starting making new site but i dont know how can i
Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.
At the minute I:
check for the orig
error help - Dynamic Image
I've been working on making my site less cluttered in the directories and more secure lately. In an
php calculate
this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNum
Displaying a record from mysql in a simple swf file
Hi,
I have a mysql database containing information I would like to display in my swf.
Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:
http://www.mydomain.com/directory/index.php