i found the script at http://www.phpfreaks.com/tutorials/6/0.phpcount varchar(255)
count_id varchar(25)
Insert a single row with the values count = 0 and count_id = 1
php/mysql counter
Moderator: General Moderators
php/mysql counter
I found a php/mysql counter tutorial and I kinda am stuck on what they mean on a part of it here is what im stuck on
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
count varchar(255) is a row in the mysql table that is like any characters but can only be 255 characters in length per cell. then other can only be 25 characters in length.
then the insert a single... is just to setup the database before you begin starting the counter so it has some data to build off of, otherwise it would try to do a ++ on a NULL field and would return NULL and you would never start counting
then the insert a single... is just to setup the database before you begin starting the counter so it has some data to build off of, otherwise it would try to do a ++ on a NULL field and would return NULL and you would never start counting
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
o sorry
. i think they are just saying run a quick query like
to setup your database but thats after you made the database and the table with the count = varchar(255) and count_id = varchar(25)
Code: Select all
$query = '
INSERT INTO
table
(count, count_id)
VALUES
("0", "1")
';
$do_query = mysql_query($query) or die(mysql_error().__LINE__);