i got this code im trying to make it update the online field for all my members to n:
PHP Code:$query = 'UPDATE b_users SET online"'n'" WHERE username="*'"';
| SitePoint Sponsor |




i got this code im trying to make it update the online field for all my members to n:
PHP Code:$query = 'UPDATE b_users SET online"'n'" WHERE username="*'"';


I'm pretty sure you can take out the WHERE username="*'" if you want to effect all users.
How does that make your feel?




not workingPHP Code:<?
include "db_connect.php";
$query = 'UPDATE b_users SET online"n"';
?>


?PHP Code:$query = "UPDATE b_users SET online='n'";
Off Topic:
I think we might have TicTac v2 here.




didnt sstill not working




anyone?


when you say it doesnt work, what do you mean? Do you get any errors or does it just not update the database?
If you are setting your entire users database to online then silentcollisions code would haev worked. what does the code look like now?
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!


Code:UPDATE b_users SET online = 'n'




not working, it jsut dosnt update the database.


PHP Code:include('db_connect.php');
$query = "UPDATE b_users SET online = 'n'";
mysql_query($query) or die(mysql_error());
17-29% of paid ad clicks are fraudulent. Get protected with Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more.




that code worked thanks.


You weren't executing the query?
You might want to look up basic PHP structure and tutorials before asking questions.


Eyes are watching.....
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!
Bookmarks