OZONE Asylum
Forums
PSPong.com - Working Area!
Collaboration (questions and answers)
This page's ID:
13156
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Actually as I prefer to do that update count (as would be used in the vote) in one go I might favour the way I laid it out. As an example the vote might go through to a page with the URL: pspong.com/vote.php?match_id=1&return_id=3&vote=3 and after a quick check to see if the call to the page came from PSPong.com or not, a quick check to see if the (I've already voted before cookie/session exists) and a quick run through is_numeric (and, of course, a connection to the DB) I'd do something like: [code] $current_vote = vote_ . $vote; $sql = "UPDATE match_details SET $current_vote = $current_vote + 1 WHERE match_id = '$match_id' AND return_id = '$return_id'"; $match_vote_result = mysql_query ($sql) or die ("Couldn't execute the match vote increment"); [/code] As I've not tested that I suspect there are a number of things wrong with the code and suggesting code to InI is a little like trying to teach ones' grandmother to suck eggs but I thought I'd clarify my position on that. I would imagine grabbing the vote array using PHP to update it and sticking the data back again would be more time consuming than tthis method but the difference may be so small as to not be worth bothering and I'm sure InI has bigger and better ideas. Emps [img]http://www.miscminutiae.com/sig/emps_oz_sig.gif[/img] [b]You're my wife now Dave[/b]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »