Re: Select clause
Bruce B. wrote:
> I am attempting to select first and last name from MySQL database newemail
> using the code below.
>
> <?php
> $name = $_POST['name'];
> $Fname = $_POST['Fname'];
>
> echo "The passed value is $name $Fname\n";
Why tell us this? You don't use either in your query.
> $query = "SELECT emailadd from newemail where name, Fname = '$emailadd'";
$emailadd is undefined.
> and I get an error message.
>
>
> Error Message:
>
> The passed value is bixby bruce SELECT emailadd from newemail where name,
> Fname = ''
> You have an error in your SQL syntax. Check the manual that corresponds to
> your MySQL server version for the right syntax to use near ' Fname = '''
> at line 1
The query is total nonsense. You have sent "SELECT emailadd from newemail
where name, Fname = ''" to mysql.
--
Brian Wakem
|