MySQL Forums
Forum List  »  MySQL Query Browser

Re: Can I format Query Output?
Posted by: Argenex Kronium
Date: May 06, 2006 07:08PM

Thanks for the quick response. Unfortunatly I'm not entirly certain how to use that string, but I managed to write a snipit of php that does it for me within the search result query.
--------
if (is_numeric($Raw[$Field]) == "true")
{
$chfield = $Raw[$Field] * 100;
$ceil = ceil($chfield * 1) /1;
print("<td>$ceil%</td>");
} else {
print("<td align=left>$Raw[$Field]</td>");
}
--------
So that worked out well.


I realise I should probably be looking for help in the php arena, but the problem is the php faqt.com site is literally just that, "Faqted up". I.E. its a mess and I can't seem to locate anything tangible.

I have found that there is a php date conversion tool as well, to format back from mysql to standard unix, but I've had almost no luck figuring that out. I don't seem to be able to integrate mysql commands as easily as I would like to. That coupled with the shear lack of experience with doing it doesn't help much either.

Right now I have a date output like:
1995-08-09 00:00:00
And all I really want to display is the year.
Unfortunatly, because of the shear amount of data, my query outputs as Raw (example in above script) and simply displays it to the screen, which minorly limits what I can and can't do.

If you can point me in the right direction that would rock,
Thank you again,
Arg.

Options: ReplyQuote


Subject
Written By
Posted
Re: Can I format Query Output?
May 06, 2006 07:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.