This is my table structure:
Datum (Timestamp) |IP |X (times visited)
2012-09-08 14:09:44 * 10
2012-09-08 13:20:01 * 34
I’m getting the data from mySQL using:
$Darray=array();
$q="SELECT FROM Datum from ips ORDER BY X DESC";
$rs=mysql_query($q) or die(mysql_error());
while($rd=mysql_fetch_object($rs))
{
$Darray[]=$rd->X;
}
But when i try
var_dump($Darray[1]);
I get NULL.
I also tried using
SELECT FROM_UNIXTIME(Datum) from ips ORDER BY X DESC
But it doesn’t change anything
You are putting the
Xcolumn into your array instead ofDatum, and it is likely null because your SQL is wrong.