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
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
> 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
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
;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
;),
> > date varchar(10),
> > subject varchar(200),
> > title varchar(200),
> > author varchar(200),
> > email varchar(50),
> > language
enum('English','Danish','Dutch','Finnish','German','Spanish
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
> 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
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
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
10 matches
Mail list logo