Jump to content

Archived

This topic is now archived and is closed to further replies.

Nightseer

Query not Working quite right.....

Recommended Posts

I am very new to this, and have run iunto a roadblock trying to make my site more secure. The query works like this:

[code]mysql_query("UPDATE core SET daysleft=daysleft-1 WHERE core='$core'")
or die ('cannot subtract days');[/code]

But when I try to add the account owner to it, it stops working. The variable is correct-checked it by having it echo before it tries to query--

[code]mysql_query("UPDATE core SET daysleft=daysleft-1 WHERE core='$core' AND ownerid='$mid'")
or die ('cannot subtract days');[/code]

The way it is now, anyone can subtract days from someone else's account-I could really use some help here ???

Share this post


Link to post
Share on other sites
When you say "stops working", I assume you mean the table isn't updated... Since there's no syntax error, I have to conclude that there are no matching rows.

Share this post


Link to post
Share on other sites
Figured it out-ownerid wasn't updating right (despite echoing correctly????) Just got it fixed about ten minutes ago:) Thanks for trying!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.