Glad to find this post and I hope you can assist me.
I'm building an application where the a row I return many times may be 0.
$query = mysql_query("SELECT * FROM Azgalor_Alliance WHERE $metode LIKE '%$search%' LIMIT 0, 50");
while ($row = @mysql_fetch_array($query))
$avgBuy = ($variable5 / $variable6);
how can I go about making $variable6 = 1 if it returns 0 ?
(this is for an auction system, Total_Price is the sum of all buy ammounts of an item and Buy_Count is the number of times the item has been purchased on the auction)
Thanks in advance...
I figured an if statement would work... but I'm lost on how I should write it.