PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 3rd, 2006, 11:26 AM
shalomdan shalomdan is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 24 shalomdan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Update Statement Not Working

Hi Coders,
someone help me...i have been running this query without success

$query_register_session = "UPDATE members SET mem_sess ='$ayo_sess_id' , memIP ='$user_host' WHERE uname = '$UserName' ";
$result_register_session = mysql_query($query_register_session);

When i echo the query, i get what looks ok to me as shown below;

UPDATE ayo_memberz SET mem_sess ='736eb2d9749650a9fd3fa66b4eb20bb4' , memIP ='192.168.0.1' WHERE uname = 'shalomdan'

But when i check the database, the members table is not updating....please someone help. What am i not doing right?
Thanks in advance.

Reply With Quote
  #2  
Old July 3rd, 2006, 11:44 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: Update Statement Not Working

check to see whether the query returns any error.. You can do this by using the mysql_error() function in the following method.

php Code:
Original - php Code
  1.  
  2. $result_register_session = mysql_query($query_register_session) or die(mysql_error());


check and see what the result is..


Reply With Quote
  #3  
Old July 3rd, 2006, 12:00 PM
shalomdan shalomdan is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 24 shalomdan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Update Statement Not Working

Thanks a million Nazly.
I had a space in my mysql field names before in the fields memIP and mem_sess...so i got the error column not found.
Corrected and working fine.
Thanks again.

> Thread Solved

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Update Statement Not Working


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway