Jump to content


Photo

PHP - MYSQL Not updating database


  • Please log in to reply
2 replies to this topic

#1 74466

74466
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationBloemfontein South_Africa

Posted 27 June 2006 - 10:17 AM

I am busy writing a code to use on my forums, using php & mysql, now the problem i have is this::

        @mysql_query("UPDATE quiz_members SET Visits = Visits+1, LoggedTime = '".time()."', OnTime = '{$nuuttyd}' WHERE Login LIKE '{$_SESSION['player']}' ");
and
        @mysql_query("UPDATE quiz_games SET Played=Played+1, TotCorrect=TotCorrect+'".$corr."', TotScore=TotScore+'".$cred."' WHERE Status=0");
and
        @mysql_query("UPDATE quiz_members SET HostStatus = HostStatus-1, TotCredits = TotCredits+150, LastQzPlayed = '".$idadd."', LastQzScore = 150, QzHosted = QzHosted+1 WHERE Login = '".$player['name']."'");
does not write to the database...

the following 2 pieces of code is in my admin panel, and it works if i update other members info, but not when i try updating the member i am logged in with...

        @mysql_query("UPDATE quiz_members SET HostStatus='".$cred."' WHERE login LIKE '{$name}'");

and

     @mysql_query("UPDATE quiz_members SET MemberGroup='{$ad}' WHERE Login LIKE '{$name}' && Login not LIKE 'RHINO' ");


on my local apache server this works 100% but as soon as i upload it to web it does not work....

#2 74466

74466
  • New Members
  • Pip
  • Newbie
  • 2 posts
  • LocationBloemfontein South_Africa

Posted 27 June 2006 - 10:38 AM

sorry, i neglected to say, i am using php 4,4,2 on my local host and on webserver, and my sql 4.1.19

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 July 2006 - 02:05 AM

I'm not sure I understand... it's not updating, or you're getting errors? You need to post the interpolated versions of those statements.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users