- Joined
- Nov 29, 2008
- Messages
- 370
- Reaction score
- 7
Ok this is just a guide where on most websites it says like
0 Users Playing
0 Accounts Created
0 Characters Created
Or whatever you have there.
I am going to tell you how to add new ones.
For an example go to
Ok so this guide can help you add any data you want
Some good Ideas to add would be
Married Couples
GameMasters
Ok anyways, here is how it's done.
0 Users Playing
0 Accounts Created
0 Characters Created
Or whatever you have there.
I am going to tell you how to add new ones.
For an example go to
To view the content, you need to sign in or register
and look on the left.Ok so this guide can help you add any data you want
Some good Ideas to add would be
Married Couples
GameMasters
Ok anyways, here is how it's done.
PHP:
1. Go to your wamp>www or whereever you go to edit your website, and go to your top.php.
2. Click Ctrl+f and search for "$num_rows"
3. Now you should see something like
$result = mysql_query("SELECT * FROM accounts");// Account section
$num_rows = mysql_num_rows($result);
$result2 = mysql_query("SELECT * FROM characters");// Character section
$num_rowsc = mysql_num_rows($result2);
$result15 = mysql_query("SELECT * FROM guilds");// Character section
$num_rowsg = mysql_num_rows($result15);
$result4 = mysql_query("SELECT * FROM accounts where banned = 1");// Account section
$num_rowsb = mysql_num_rows($result4);
$result5 = mysql_query("SELECT * FROM accounts where loggedin = 2");// Account section
$num_rowsl = mysql_num_rows($result5);
4. Ok first, you want to add a new data to the website.
5. Copy and paste this
$result6 = mysql_query("SELECT * FROM tablename where rowname = number");// Account section
$num_rows = mysql_num_rows($result6);
Where it says result, make the number 1 higher then your last one.
So if your last one is result 5, like above, make the next 1 result 6.
Now where is says num_rows where you copied the example
$result6 = mysql_query("SELECT * FROM tablename where rowname = number");// Account section
[B]$num_rows[/B] = mysql_num_rows($result6);
Add a letter infront of num_rows somewhere
Example: $num_rowsw (I added a w at the end)
Now where it says table name, row name, and number. Fill that out.
$result6 = mysql_query("SELECT * FROM [B]tablename[/B] where [B]rowname[/B] = [B]number[/B]");
So say you want to make it read how many donators you have, you write this
$result6 = mysql_query("SELECT * FROM accounts where donator = 1");// Account section
$num_rowsw = mysql_num_rows($result6);
That will tell you how many donators you have.
Now to add it onto the website.
Look below where you see stuff like this
<b>".$num_rowst."</b> Accounts<br>
Copy and paste that to the bottom of the list, and where it says accounts, change it to the name you want displayed
Ex. Donators
where it says $num_rows change that to what you put earlier ($num_rowsw)
Now you're done! It should look like this!
[B]$result6 = mysql_query("SELECT * FROM accounts where donator = 1");// Account section
$num_rowsw = mysql_num_rows($result6);
<b>".$num_rowsw."</b> Donators<br>
[/B]