Yar Posted March 5, 2008 Share Posted March 5, 2008 Hi. I need to output a string (in specific format) based on a row of data from a table. What is faster: 1. Fetch all the needed columns from MySQL database, AND THEN format them with PHP's printf() function or 2. Create a view with a column properly formatted, using CONCAT(), IF(a,b,c), etc. The view would contain all the other columns from the table it operates on. AND THEN QUERY that view instead. ? thanks & regards /Yar Quote Link to comment Share on other sites More sharing options...
Barand Posted March 5, 2008 Share Posted March 5, 2008 try timing both methods and see http://www.phpfreaks.com/forums/index.php/topic,183317.msg819918.html#msg819918 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.