RE: [PHP] whats wrong
| From: | Don Read | Date: | Tue, 24 Jul 2001 20:07:41 +0000 |
| Subject: | RE: [PHP] whats wrong | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-59424@lists.php.net to get a copy of this message | ||
On 24-Jul-2001 Jeremy Morano wrote:
> Whats wrong with this?
>
>
> $sql = "INSERT INTO $table_name
> (uid,companyUid, first_name, last_name, address, state, zip_code, country,
> company, occupation, telephone, fax, email, user_name, password)
> SELECT
> \"\", \"uid from companyTable WHERE company= "Itsolutions"\,
>
> \"$first_name\",\"$last_name\",\"$address\",\"$state\",\"$zip_code\",\"$coun
> try\",\"$company\", \"$occupation\", \"$telephone\",
> \"$fax\", \"$email\",
> \"$user_name\", \"$password\"
> ";
>
A. It's un-readable.
B. you prolly did'nt test | display the error message.
Change your \" to ' and the problem is obvious
(spoiler: 'WHERE' comes after the field list).
Regards,
--
Don Read dread@texas.net
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.