Ok, i am adding a table to the users table called online.
So when they login it will set (online) to Y and when they logout it will be set to N.
But what should it be created as, it will be updated often and i need to beable to read it from my php in the Members online section?
varchar(50), int(10), or Text...
And how do i call the results of it not in text Y but in total.
Like lets say there is a total 50 users=Y so it will PRINT 50.
I have tried several times but i keep getting eather 9empty) or (Y) Not the total as 8
I created the table like this:
[PHP]ALTER TABLE users
ADD online varchar(1) default 'N';[/PHP]
And call it like this:
[PHP]$sql="SELECT online FROM users WHERE online = $Y";
$result = mysql_query($sq l ,$db);[/PHP]
And call it:
[PHP]<?php printf($online) ; ?>[/PHP]
is there a special way to count the value of Y and skip N
So when they login it will set (online) to Y and when they logout it will be set to N.
But what should it be created as, it will be updated often and i need to beable to read it from my php in the Members online section?
varchar(50), int(10), or Text...
And how do i call the results of it not in text Y but in total.
Like lets say there is a total 50 users=Y so it will PRINT 50.
I have tried several times but i keep getting eather 9empty) or (Y) Not the total as 8
I created the table like this:
[PHP]ALTER TABLE users
ADD online varchar(1) default 'N';[/PHP]
And call it like this:
[PHP]$sql="SELECT online FROM users WHERE online = $Y";
$result = mysql_query($sq l ,$db);[/PHP]
And call it:
[PHP]<?php printf($online) ; ?>[/PHP]
is there a special way to count the value of Y and skip N
Comment