please tell me why use "select IF"
Posted: Wed Nov 28, 2007 12:56 am
feyd | Please use
please tell me why use: "select IF"?
what is the mean to use "select IF" in mysql query?
and the string : "customers_payment_allowed <> '' ",
i don't know why use this string.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Code: Select all
$query = mysql_query("select IF(c.customers_payment_allowed <> '', c.customers_payment_allowed, cg.group_payment_allowed) as payment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id = '" . $customer_group_id . "'");please tell me why use: "select IF"?
what is the mean to use "select IF" in mysql query?
and the string : "customers_payment_allowed <> '' ",
i don't know why use this string.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]