Web Design and Development Forums

changing vaules in tables

This is a discussion on "changing vaules in tables" within the MySQL section. This forum, and the thread "changing vaules in tables are both part of the Databases category.


Go Back   Webforumz.com > Databases > MySQL

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Mar 16th, 2008, 19:17   #1 (permalink)
Junior Member
 
Join Date: Feb 2008
Location: U.S.A
Age: 26
Posts: 24
changing vaules in tables

hey guys, i need to be able to change a specific value in a table: there are three values in a row in this table, NAME, PASSWORD, and BOOLY. i want to be able to toggle BOOLY for when the person is logged on or not, so change that value to 0 when they are not logged on, and 1 when they are. i have all the rest of the code done, just this part is stumping me. i tried fetching the array of this row and saying "$result['BOOLY'] = "1" " and so forth, but that didnt change it in the database for some reason. thnaks guys
iochinome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 18th, 2008, 00:32   #2 (permalink)
Junior Member
 
Join Date: Feb 2008
Location: U.S.A
Age: 26
Posts: 24
Re: changing vaules in tables

does nobody know or is this impossible and no one wants to tell me? thx
iochinome is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Mar 18th, 2008, 11:53   #3 (permalink)
Most Reputable Member
 
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
Blog Entries: 2
Send a message via Yahoo to Monie
Re: changing vaules in tables

Yeah this is definitely possible

Monie's Tips:
Assuming you have a Login-Verify-Success method of doing your login page... So, in your verify page, you should have some kind of redirect the user to the main page , right? Ok, right before the redirect code, you need to execute some sql statement that will UPDATE your 'BOOLY' field and set it to 1.

When you logging out, you will also need to execute some sql statement that will UPDATE your 'BOOLY' field and set it to 0.

MySQL Sample Statement:
PHP: Select all

// Your database connection here...
// TITLE: Update User Status/Info Upon Login Session
$sql "UPDATE TableName SET BOOLY = 1 WHERE username = '$name'";
$result mysql_query($sql$connection) or die(mysql_error()); 
Let me know if you stuck!
Could you post in your verify.php page as well as your logout.php page?
Cheers...
__________________


Last edited by Monie; Mar 18th, 2008 at 11:59.
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing these Tables Aerdan CSS Forum 8 Nov 24th, 2007 18:44
Changing CSS with PHP Emzi PHP Forum 7 Oct 11th, 2007 23:24
changing pic's bruno89 HTML Forum 4 Sep 8th, 2006 15:22
changing %20 in URL using PHP JamieH PHP Forum 1 Dec 8th, 2005 13:52
why are my fonts changing? Val J Flash & Multimedia Forum 0 Sep 1st, 2005 20:29



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 07:03.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59