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!
FILTER_CALLBACK -- Files?
Hi All,I'm using the php filter functions to validate my form data. For custom filters, I'm using the FILTER_CALLBACK filter but when I'm using files, this never seems to be called? It may be that the
Help With editting and deleting form
Hallo !!So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this
Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called datetime. I tried to use Now() but its not working. Code: <?php$con =
Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in the right direction...here is my problem. I have index.php in that file i have included login.php
Writing Windows Device Drivers with C
Yes: one of the nice features of C is void*. You can put anything there and get anything out. Very error prone but absolutely brilliant for device drivers.Try
Polymorphism
Was wondering if someone could explain this a little better to me. I had always assumed that it had to do with method overloading or overriding(through inheritence). The following wikipedia entry
Linkage between two scripts
Okay say I have this for a link in a script:Code: <li><a href="#" onclick="ajaxpage('bio', 'content'); return
How to return to a previous page after running a PHP script
I'm having a bit of a melt down here because I think this should be really easy but can't work it out...!My page lists the records in my database and next to each record is a 'Delete' button. What I
Formatting echo from database
So I have a database that stores First and last names, then echos them back to a website, as of now the entire first and last name echos back (John Smith) I want the last name to just display the
How to write on database when a link is clicked?
Hi,