[PHP] Help INSERTing to MySQL

2001-02-23 Thread Clayton Dukes
Hello, This is my first attempt, so I'm prolly doing something stupid, but can someone tell me why this doesn't work? All it returns is "Unable to INSERT to database"       ---BEGIN---    $time = time();   $rand = Random_Password(5);   $docid = $time . $rand;       if (isset($email) && isset

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Joe Stump
Before your VALUES you need to have a list of the fields ie: insert into table (id,fname,lname) values ('$id','$fname','$lname') --joe On Fri, Feb 23, 2001 at 08:00:30PM -0500, Clayton Dukes wrote: > Hello, > This is my first attempt, so I'm prolly doing something stupid, but can someone tell

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Philip Olson
> Hello, This is my first attempt, so I'm prolly doing something stupid, > but can someone tell me why this doesn't work? All it returns is > "Unable to INSERT to database" Change : or die("Unable to INSERT to database"); To : or die(mysql_error()); And see what it tells you. Odds are ther

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Clayton Dukes
um('High School','College','Other'), city varchar(15), state varchar(15), county varchar(15), school varchar(45), zip smallint(5), authorcomments varchar(200), teachercomments varchar(200), approve enum('Y','N'), docdata text

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Kyndig
;Finnish','German','Spanish'), > grade int(3), > level enum('High School','College','Other'), > city varchar(15), > state varchar(15), > county varchar(15), > school varchar(45), > zip smallint(5), > authorc

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Clayton Dukes
;), > > date varchar(10), > > subject varchar(200), > > title varchar(200), > > author varchar(200), > > email varchar(50), > > language enum('English','Danish','Dutch','Finnish','German','Spanish

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread php3
Addressed to: Clayton Dukes <[EMAIL PROTECTED]> [EMAIL PROTECTED] ** Reply to note from Philip Olson <[EMAIL PROTECTED]> Sat, 24 Feb 2001 01:31:30 + (GMT) > > > > Hello, This is my first attempt, so I'm prolly doing something stupid, > > but can someone tell me why this doesn't

Re: [PHP] Help INSERTing to MySQL

2001-02-23 Thread Philip Olson
> If I knew I could get answers that easy here, I woudn't have worked on this > for 20 hours :-) > > THANKS > > btw, field one is an ID field set to auto increment, how can I insert that > if I don't know what it is? In this case use NULL as the value for id and it'll auto increment nicely

RE: [PHP] Help INSERTing to MySQL

2001-02-23 Thread ..s.c.o.t.t..
0 also works for AUTO_INCREMENT fields... > -Original Message- > From: Philip Olson [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 23, 2001 18:41 > To: Clayton Dukes > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Help INSERTing to MySQL > > > > > I

RE: [PHP] Help INSERTing to MySQL

2001-02-23 Thread ..s.c.o.t.t..
ruary 23, 2001 17:21 > To: Clayton Dukes > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Help INSERTing to MySQL > > > Before your VALUES you need to have a list of the fields ie: > > insert into table (id,fname,lname) values ('$id','$fname','$ln