Hi all
I'm translating some code from another server-side language into PHP,
and I need something that 'summarizes' results found from a MySQL
SELECT. I.e. -
$foundTrackingRows=mysql_query(SELECT...
while ($TrackingRow = mysql_fetch_object($foundTrackingRows)) {...
..such that the while
Govinda wrote:
Hi all
I'm translating some code from another server-side language into PHP,
and I need something that 'summarizes' results found from a MySQL
SELECT. I.e. -
$foundTrackingRows=mysql_query(SELECT...
while ($TrackingRow = mysql_fetch_object($foundTrackingRows)) {...
..such
You need to do this on the mysql side, not in php - php can't
summarize the data before processing it, so you need to use
something like the date() function in mysql on your timestamp column.
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date
without knowing
On Sun, Aug 2, 2009 at 8:02 PM, Govindagovinda.webdnat...@gmail.com wrote:
You need to do this on the mysql side, not in php - php can't summarize
the data before processing it, so you need to use something like the date()
function in mysql on your timestamp column.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I host a number of running clubs websites. They are all hosted on
different domains on a hosting service.
They all share a common database table of fixtures. At present I have
copied the database table to each domain but this time consuming.
I
Neil Jackson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I host a number of running clubs websites. They are all hosted on
different domains on a hosting service.
They all share a common database table of fixtures. At present I have
copied the database table to each domain but
On Sun, Aug 2, 2009 at 8:02 PM,
Govindagovinda.webdnat...@gmail.com wrote:
You need to do this on the mysql side, not in php - php can't
summarize
the data before processing it, so you need to use something like
the date()
function in mysql on your timestamp column.
What does the resultset look like?
I am getting every record in the table back
On Sun, Aug 2, 2009 at 10:15 PM, Chrisdmag...@gmail.com wrote:
Neil Jackson wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I host a number of running clubs websites. They are all hosted on
different domains on a hosting service.
They all share a common database table of
On Sun, Aug 2, 2009 at 11:13 PM, Govindagovinda.webdnat...@gmail.com wrote:
What does the resultset look like?
I am getting every record in the table back
my bad, i reversed the mysql and php date function formats
try
SELECT distinct(
DATE_FORMAT( fieldname, '%Y-%m-%d' )
)
FROM table
ORDER
You need to do this on the mysql side, not in php - php can't
summarize the data before processing it, so you need to use
something like the date() function in mysql on your timestamp column.
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date
I am out of the office until 24/08/2009.
I will have limited access to email during this time.
If you have a TRAXi3 or general Precision query, please contact
helpl...@precisionsoftware.com.
It is recommended that you contact your Precision Project Manager for
further assistance.
Or visit
You need to do this on the mysql side, not in php - php can't
summarize the data before processing it, so you need to use
something like the date() function in mysql on your timestamp column.
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date
Oops, forgot to mention that with the alias you can change the ORDER
BY
clause to use the aliased column data:
ORDER BY solarLandingDate DESC
this will only use the returned data instead of the entire column.
If you are aliasing a column it is better to use the optional AS
keyword
to avoid
The distinct can only work as you want it to work when you only select the
date column and only the date part (not the time part).
Unfortunately I'm more an oracle DBA where the date functions are more clear
to me so can not help with exact syntax.
I think what you should be doing is returning
The distinct can only work as you want it to work when you only select the
date column and only the date part (not the time part).
Unfortunately I'm more an oracle DBA where the date functions are more clear
to me so can not help with exact syntax.
I think what you should be doing is
16 matches
Mail list logo