Hi,
I would like to find out if there is a way for php to replace certain string text that mysql outputs from a query to some other human readable format.
when I run a query, it outputs ef:assignedTask but I would like to simply change it to "Assigned" with PHP.
Can someone point me to a right direction?
Thanks in advance.
Best,
jchang
PHP to change output string from mysql to something else?
Moderator: General Moderators
Re: PHP to change output string from mysql to something else
Is "ef:assignedTask" a field name? If it is, you can return an alias for a field with this syntax:
You can omit "AS", but the query is more readable with the keyword included.
Edit: This post was recovered from search engine cache.
Code: Select all
SELECT `ef:assignedTask` AS `Assigned` FROM `table`Code: Select all
SELECT `ef:assignedTask` `Assigned` FROM `table`