Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8561923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:36:51+00:00 2026-06-11T16:36:51+00:00

This is my table structure: Datum (Timestamp) |IP |X (times visited) 2012-09-08 14:09:44 *

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:36:52+00:00Added an answer on June 11, 2026 at 4:36 pm

    You are putting the X column into your array instead of Datum, and it is likely null because your SQL is wrong.

    // Create array to hold date values
    $date_array = array();
    
    // Get all dates from ips table ordered by X column
    $q = "SELECT `Datum` FROM `ips` ORDER BY `X` DESC";
    
    // Query mysql
    $rs = mysql_query($q) or die(mysql_error());
    
    // Loop through results as PHP objects
    while( $rd = mysql_fetch_object($rs) ) {
        // put the Datum value into array
        $date_array[] = $rd->Datum;
    }
    
    // Dump the contents of the $date_array
    var_dump($date_array);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an table structure like this mysql> SELECT id, name, parent_id FROM categories;
I have this table structure and would like to map it using Fluent Hibernate
I'm using Hibernate 3.3.1 and am following along in modelling this sample table structure
Consider this table structure people{id,firstName,lastName,preferredName} list{id,person1_id,person2_id} I want to get all data from list
I'm using this table structure for a 'toxi' like TAGs system table TAGS +--------+-------------------+
I'm trying to replicate this table structure from this article. Here are my POCO's
I have a question about MySQL. I have this table structure: ID Name ------
Given this table structure and example data (t3 should not be used in the
I am having following table structure and having the following Data in this table
Table structure goes something like this: Table: Purchasers Columns: id | organization | city

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.