Jump to content

Dillinger

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.dillingerinteractive.com

Profile Information

  • Gender
    Not Telling
  • Location
    Brit ex-pat in MA, U.S.

Dillinger's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Showing us the code would likely be a good start...
  2. the DATE_FORMAT () is a MySQL function that the database understands, it's a way of having the database engine format the date for you, instead of doing it in PHP so to break it down SELECT column1, column2, column3 etc, DATE_FORMAT(eventdates.`date`, '%W-%d-%Y') alias FROM X WHERE Y alias shows up as a dynamic field in your results set window. you can call it anything you want. this specific code spits out Monday-26-2004 for the first row. Scroll down a bit here for the reference http://dev.mysql.com/doc/mysql/en/date-and...-functions.html On edit - Of course, I just realized that Monday-26-200x is redundant, so I'll be changing the parameters on that one
  3. Alias the field names SELECT buscontacts.fTitle ftitlefrombus ,buscontacts.fForenames fForenamesfrombus ,buscontacts.fSurname fSurnamefrombus , candidates.fTitle fTitlefromcan and so on and so forth
  4. The way the date function works is that if there's no parameter passed to it, it defaults to now, and you're not passing it any parameters. In order to get the date out of the date field, try <?php date_added = date("l M d, Y @ g:i A", $_recordset1['date_added']); echo ($date_added); ?> I've been having all sorts of trouble with timestamp to date with this function, today I found a MySQL function to pull the data (date) out of the database just as you want it, skipping having PHP reword it, so in my select statement I have DATE_FORMAT(eventdates.`date`, '%m-%d-%Y') alias date is a reserved word in SQL, so use the ` to escape it, alias is just a way to give that record a name that the GUI can handle
×
×
  • 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.