Jump to content
php.lv forumi

Kapec taa


lvspeedy

Recommended Posts

Soien visu dienu meginu uztaisit skriptu kas ievieto datu baaazee informaaciju bet nesanaak

sitas php

$dbha=@mysql_connect("localhost","root","123456789123456789")or die ("nesanak1");
@mysql_select_db("speedy",$dbha)or die ("nesanak2");
$res=@mysql_query("insert into baze values(null,'e','s','s')")or die ("nesanak3");
printf ("Last inserted record has id %d\n", mysql_insert_id());

tas butu mysql tabulai

create table baze
(
 id int not null auto_increment
,  nick varchar(50) not null
,  pass varchar(50) not null
,  name varchar(50) not null
,  pilseta varchar(50) not null
,  dzimene numeric not null
,  dzimums varchar(50) not null
,  telefons varchar(50) not null
,  bilde varchar(50) not null
,  texts varchar(50) not null
,  pievienojas numeric not null
,  mail varchar(50) not null
,  primary key (id)
)

problema taada, ka vins man neievieto visaas kolonaas vajadziigo tekstu, ja meegina tikai piemeeram ieikt infu nick tad iet

varbut kads, zin, lasiju gramatu neatradu un manuaali arii neko neatradu

Link to comment
Share on other sites

ja rakasta insertu ne visaam kolonnaam tad taas ir jaauzskaita:

INSERT INTO baze (nick, pass,name) VALUES ('bubu', 'bubu', 'tralalaa')

INSERT sintaksi vispaar pats zini? (manuaalii nedomaajis skatiities?)

Link to comment
Share on other sites

×
×
  • Create New...