Nightseer Posted September 28, 2006 Share Posted September 28, 2006 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 ??? Link to comment https://forums.phpfreaks.com/topic/22342-query-not-working-quite-right/ Share on other sites More sharing options...
fenway Posted September 28, 2006 Share Posted September 28, 2006 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. Link to comment https://forums.phpfreaks.com/topic/22342-query-not-working-quite-right/#findComment-100291 Share on other sites More sharing options...
Nightseer Posted September 28, 2006 Author Share Posted September 28, 2006 Figured it out-ownerid wasn't updating right (despite echoing correctly????) Just got it fixed about ten minutes ago:) Thanks for trying! Link to comment https://forums.phpfreaks.com/topic/22342-query-not-working-quite-right/#findComment-100362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.