Domanda

Il valore verrà utilizzato come:

from INTEGER UNSIGNED NOT NULL

che definisce diversi visitatori che non hanno effettuato l'accesso.

Come generare correttamente quel numero con PHP?

Modifica :

Se si utilizza il database come segue:

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

Come inserire un nuovo record in esso?

È stato utile?

Soluzione

Usa l'id:

INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT

Altri suggerimenti

Puoi inserire un valore in un database ogni volta con una colonna auto_increment.

Puoi anche usare la funzione php uniqid ().

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top