Page 1 of 1
understanding this
Posted: Sun Jun 10, 2007 11:45 am
by m2babaey
I what do these 2 lines do?
Code: Select all
$result = $db->sql_query($sql);
$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
Posted: Sun Jun 10, 2007 11:48 am
by jayshields
Line 1 probably executes an SQL query and sets the result of it to $result.
Line 2 sets $l_total_user_s to "TOTAL_USERS_ZERO" if $total_users is equal to 0, and to "TOTAL_USERS_OTHER" if $total_users is not equal to 0.
Re: understanding this
Posted: Sun Jun 10, 2007 5:03 pm
by califdon
m2babaey wrote:I what do these 2 lines do?
Code: Select all
$result = $db->sql_query($sql);
$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
Someone has kindly answered your question, but be advised that many readers will ignore a meaningless Subject line like "understanding this." If you make future posts in this forum,
please indicate in your Subject line what the nature of your question is. Almost nobody has the time or patience to read every new post. We usually only read those posts that are in our area of interest. By putting a generic Subject on your post, you just about guarantee that the people most likely to be able to answer you will never read your post.
Posted: Sun Jun 10, 2007 10:24 pm
by m2babaey
Someone has kindly answered your question, but be advised that many readers will ignore a meaningless Subject line like "understanding this." If you make future posts in this forum, please indicate in your Subject line what the nature of your question is. Almost nobody has the time or patience to read every new post. We usually only read those posts that are in our area of interest. By putting a generic Subject on your post, you just about guarantee that the people most likely to be able to answer you will never read your post.
You are right. I'm sorry for that bad title. but no meaningful title came to my mind except including the code in the subject that would be too long
