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 Like 37 Dislike
Previous forums Next forums
Other forums

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

Port scanner problem
Hai
recently i developed one app through which u can check the opened and closed ports under an

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

Php WordPress help
I am writing the following code for making a plugin

<?php
header("Content-Type

help with this code please?
Hello,

I am trying to build a remote upload script for my image hosting site.

I am usi

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Dynamically set AccordianPane Header
I have an accordian on my master page. I'd like to be able to dynamically change the header on diff

Map.php
I am a complete beginner to PHP and am looking for some help with a program I am messing around with

Get to know your fellow coder
I think it's time we got personal around here. There's a lot of code swapping and a few members kno

Help a newbee save my job !
Hey guys i am dying here i am new to php and would like for someone to help me with this problem

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash