PHP extracting mysql databse date -...

User 2699991 Photo


Registered User
2,506 posts
Online Now

couldn't be much easier than Jamie's suggestion

The Help You Need: When You Need It The Most
User 78051 Photo


Registered User
199 posts

Jim Cantrell wrote:
I have decided to add a new column to the database and instead of setting it as a Date field I will set it as text, there will only be one person entering the info plus the field will not be used as a search.

It's far easier than going through all this.


OK Jim

What is your recordset name? And what is the name of the date column you are wanting to use in the database?
User 126492 Photo


Ambassador
1,506 posts

Jamie wrote:
Jim Cantrell wrote:
I have decided to add a new column to the database and instead of setting it as a Date field I will set it as text, there will only be one person entering the info plus the field will not be used as a search.

It's far easier than going through all this.


OK Jim

What is your recordset name? And what is the name of the date column you are wanting to use in the database?


If you look at my first post the table name is speed and the the name of the date column is created_at as in this line:
$field1 = $arow["created_at"];
Jim
---------------------------
User 78051 Photo


Registered User
199 posts

Ok it looks like your record set name is $result?

So, all you need to use is the record set name and replace where I put the word 'Recordset' and replace the word 'columnname' with created_at

Then put that line of php in the place you want it displayed....
User 126492 Photo


Ambassador
1,506 posts

I tried what you suggeste and all I got was a blank page.

Thanks for trying though.

I have sorted it by adding a new field instead of using a date feild. It is much easier and there is only one person who will be adding the inputs to the database.
Jim
---------------------------

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.