Old 06-12-2005   #1 (permalink)
Registered User
 
Space Cowboy's Avatar
 
Join Date: May 2005
Location: England (South)
Posts: 40

Easy Script

This might sound a realy stupid question but i cant get my head around it! Im tryin to set ALL the values for the colum logedin to 0, im ussing the bellow script but it not working, can some one point me in the right direction, thanks!

Code:
<?php

include 'config.php';
$do = mysql_query("UPDATE Finnal_Users SET Logedin = 0 WHERE username='username' LIMIT 1") or die(mysql_error());
mysql_close($l);
?>
__________________
Space Cowboy

Thanks for all the help here guys!
Space Cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 06-13-2005   #2 (permalink)
Sheep Worrier
 
Man1c M0g's Avatar
 
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,073
Blog Entries: 14

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
Try this:
Code:
<?php
include 'config.php';
$do = mysql_query("UPDATE Finnal_Users SET Logedin = 0 WHERE Logedin > 0") or die(mysql_error());
mysql_close($l);
?>
That'll set all Logedin rows to '0', whatever the username.
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 06-13-2005   #3 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
@Cowboy:Your Script got wrong because of LIMIT = 1,this makes the script run only one
Try to use Mog`s solution,its right
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 06-13-2005   #4 (permalink)
Registered User
 
Space Cowboy's Avatar
 
Join Date: May 2005
Location: England (South)
Posts: 40

Thanks again guys works perfectly!
__________________
Space Cowboy

Thanks for all the help here guys!
Space Cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz help w/ PHP-MySQL membership script Tutorial Oasis HTML / PHP / ASP / JS 9 12-01-2005 11:40 PM
Simple Member script help? ViciOuS HTML / PHP / ASP / JS 17 04-15-2005 10:42 PM
Affialiate script... malboroman HTML / PHP / ASP / JS 5 02-16-2004 01:29 PM


All times are GMT +1. The time now is 08:33 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT