RE: [PHP] Can you find the parse error?

2002-03-29 Thread Eric Kilgore

There are a couple of carriage returns, but this has never affected any of
my other code. I'm using dreamweaver.

-Original Message-
From: Henning, Brian [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 1:55 PM
To: 'Eric Kilgore'
Subject: RE: [PHP] Can you find the parse error?


is there a carrage return in the middle of the statement?  what editor are
you using?
it might be wrapping wrong

-Original Message-
From: Eric Kilgore [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 3:46 PM
To: php-general (E-mail)
Subject: [PHP] Can you find the parse error?


What's wrong with this code that it would give this error?

Parse error: parse error, expecting `','' or `';''

$query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address, State,
City, Zip, Phone,
 Fax, email, fee) VALUES ('.$UserID.', '.$Complex.',
'.$Contact.',
'.$Address.',
  '.$State.', '.$City.', '.$Zip.', '.$Phone.', '.$Fax.',
'.$email.', '.$fee.');

I think I've been staring at it too long. I can't find it.

Eric


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Can you find the parse error?

2002-03-29 Thread Rick Emery

I ran it through my PHP.  Worked fine.

You may wish to close each line with a .

-Original Message-
From: Eric Kilgore [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 3:46 PM
To: php-general (E-mail)
Subject: [PHP] Can you find the parse error?


What's wrong with this code that it would give this error?

Parse error: parse error, expecting `','' or `';''

$query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address, State,
City, Zip, Phone,
 Fax, email, fee) VALUES ('.$UserID.', '.$Complex.',
'.$Contact.', '.$Address.',
  '.$State.', '.$City.', '.$Zip.', '.$Phone.', '.$Fax.',
'.$email.', '.$fee.');

I think I've been staring at it too long. I can't find it.

Eric


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Can you find the parse error?

2002-03-29 Thread Miguel Cruz

On Fri, 29 Mar 2002, Eric Kilgore wrote:
 What's wrong with this code that it would give this error?
 
 Parse error: parse error, expecting `','' or `';''
 
 $query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address, State,
 City, Zip, Phone,
Fax, email, fee) VALUES ('.$UserID.', '.$Complex.', '.$Contact.',
 '.$Address.',
 '.$State.', '.$City.', '.$Zip.', '.$Phone.', '.$Fax.',
 '.$email.', '.$fee.');
 
 I think I've been staring at it too long. I can't find it.

I don't see an error, but wouldn't it be easier (and faster) to write:

  $query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address,
  State, City, Zip, Phone, Fax, email, fee) VALUES ('$UserID', '$Complex',
  '$Contact', '$Address', '$State', '$City', '$Zip', '$Phone', '$Fax',
  '$email', '$fee');

without all the concatenation?

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Can you find the parse error?

2002-03-29 Thread Eric Kilgore

Good to know I'm not going crazy. I found the error in the previous
function. I failed to end an echo statement and the next quote on that page
was this statement. Doh.

-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 2:08 PM
To: Eric Kilgore
Cc: php-general (E-mail)
Subject: Re: [PHP] Can you find the parse error?


On Fri, 29 Mar 2002, Eric Kilgore wrote:
 What's wrong with this code that it would give this error?

 Parse error: parse error, expecting `','' or `';''

 $query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address,
State,
 City, Zip, Phone,
Fax, email, fee) VALUES ('.$UserID.', '.$Complex.', '.$Contact.',
 '.$Address.',
 '.$State.', '.$City.', '.$Zip.', '.$Phone.', '.$Fax.',
 '.$email.', '.$fee.');

 I think I've been staring at it too long. I can't find it.

I don't see an error, but wouldn't it be easier (and faster) to write:

  $query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address,
  State, City, Zip, Phone, Fax, email, fee) VALUES ('$UserID', '$Complex',
  '$Contact', '$Address', '$State', '$City', '$Zip', '$Phone', '$Fax',
  '$email', '$fee');

without all the concatenation?

miguel


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Can you find the parse error?

2002-03-29 Thread Kevin Stone

I have found it safer to use backticks on all of my table and field
names.  I doubt that's the problem but it's a good practice and
something to try anyway.

INSERT INTO `tblUserInfo` (`UserID`, `Complex`, `Contact`,.. etc..

By the way what are those complicated looking '.$var.' for?  You
should only have to do '$var'

If all else fails run the query string through phpMyAdmin if you have it
installed.  That usually helps me pin down the problem.

-Kevin

-Original Message-
From: Eric Kilgore [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 29, 2002 2:46 PM
To: php-general (E-mail)
Subject: [PHP] Can you find the parse error?

What's wrong with this code that it would give this error?

Parse error: parse error, expecting `','' or `';''

$query = INSERT INTO tblUserInfo (UserID, Complex, Contact, Address,
State,
City, Zip, Phone,
 Fax, email, fee) VALUES ('.$UserID.', '.$Complex.',
'.$Contact.',
'.$Address.',
  '.$State.', '.$City.', '.$Zip.', '.$Phone.',
'.$Fax.',
'.$email.', '.$fee.');

I think I've been staring at it too long. I can't find it.

Eric


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php