Jump to content

Kevin3374

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Kevin3374's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yeh, I actually found that through google also, but it didn't answer my specific question.
  2. When you implement a single-instance class, it allows one instance of this class for each instance of the script correct? In other words if 5 people are accessing the same script simultaneously, they each have their own instance of the class. But each individual user cannot create more than one instance of this class, correct?
  3. Okay, I'm sure its somewhere really obvious and I'm just blind. But I don't see a 'topic solved" link anywhere. I even did ctrl-f and the only result was in your reply to me.
  4. Thanks, that worked perfectly. Not sure why my book said to do it the way I had it, but your way definitely works.
  5. I'm having some trouble inserting timestamps into a mysql table. I am inserting entries into a table using the following query: $query = <<<SQLQUERY INSERT INTO Events SET start_date = FROM_UNIXTIME($startDates[$x]), end_date = FROM_UNIXTIME($endDates[$x]), title = "$titles[$x]", location = "$locations[$x]" SQLQUERY; Note that start_date and end_date were created with type DATE, in mysql. In another file, I am trying to select and display the records from this table using the following code $query_str = "SELECT UNIX_TIMESTAMP(start_date), UNIX_TIMESTAMP(end_date), title, location FROM Events"; $result = $conn->query($query_str); //left out a few lines here while (($row_data = @$result->fetch_assoc()) !== NULL) { echo "<tr><td>{$row_data['start_date']}"; if($row_data['end_date'] != NULL) echo " - " . date('M d', $row_data['end_date']). "</td>"; else echo "</td>"; echo "<td>{$row_data['title']}</td><td>{$row_data['location']}</td></tr>\n"; }//end while I get the title and locations back correctly, but the cells for the dates all come back empty. Anyone have any idea what I'm doing wrong?
  6. bump de bump you gotta bump de bump
  7. I have a bunch of dates in a MySQL table that were inserted using FROM_UNIXTIME and stored in a field of type DATE. When I execute a query a SELECT query using UNIX_TIMESTAMP I get nothing. However, if I write a regular SELECT without UNIX_TIMESTAMP, I get the correct dates back, but as strings. Anyone have any ideas on why UNIX_TIMESTAMP is causing problems. Something else interesting, is when I run the query from the MySQL console itself, the query works. But when I execute the same query from within a PHP script, I get nothing. Any thoughts or tips would be greatly appreciated.
  8. I'm new to Eclipse PDT and from what I can tell it does not include built-in ftp support. What is the easiest way to do this?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.