Ok here is another newbie question. For everyone that has helped me in the past thanks. Here is another duzzie. Here is the scenario: I am working on a ranking system. I know sounds easy right? Well here is the twist. It has to be bussiness name defined. Like lets say Designcmc.com is ranked 10 it needs to pull the current rank out of the db then add 10 , Pull the current users out of the database add 1 and then divide the newrank by the new users. And then Update the users number and update the rank. So how can this be done?
I have partial code. See if its worth anything...ignore if not.
<?php
$db = mysql_connect("localhost");
mysql_select_db("saintparis", $db);
$sql = "Select * from class where bus_name='$businessname'";
$oldrank = print("%s\n",$row["rank"]);
$newrank = $oldrank ++ $rank1;
$oldusers = print("%s\n",$row["users"]);
$newusers = $oldusers + 1;
mysql_query($sql);
?>
Am I even close? The rank1 is coming from a web form. I can manage it after that. So can anyone help this newbie out? Oh I know it has something to do with the Update function...but I don't know how. Sorry
Thanks to everyone helping me with this! Thanks!
Chad R. Smith
Devoted PHP programmer for life now!
ASP SUCKS. 🙂
www.designcmc.com