0

The value will be used as:

from INTEGER UNSIGNED NOT NULL

which defines different visitors that haven't login.

How to properly generate that number with PHP?

EDIT:

If using database as follows:

create table user_visits(
    id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
    primary key(id)
);

How to insert a new record into it?

omg
  • 136,412
  • 142
  • 288
  • 348

3 Answers3

2

http://www.php.net/manual/en/function.uniqid.php

Aziz
  • 859
  • 6
  • 16
1

Use the id:

INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT
soulmerge
  • 73,842
  • 19
  • 118
  • 155
0

You can insert a value in a database each time with an auto_increment column.

You can also use the php function uniqid().

codymanix
  • 28,510
  • 21
  • 92
  • 151