Select clause
3 Message(s) by 3 Author(s) originally posted in mysql discussion
| From: Bruce B. |
Date: Sunday, October 21, 2007
|
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";$
query = "SELECT emailadd from newemail where name, Fname = '$emailadd'";
and I get an
error message.Error Message:
The passed value is bixby bruce SELECT emailadd from newemail where name,
Fname = ''
You've 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
Can anyone help?
TIA
| From: Brian Wakem |
Date: Sunday, October 21, 2007
|
wrote in message:
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 do not 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've 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 1The query is total nonsense. You've sent "SELECT emailadd from newemail
where name, Fname = ''" to mysql.--
Brian Wakem
| From: Jerry Stuckle |
Date: Sunday, October 21, 2007
|
wrote in message:
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";
$query = "SELECT emailadd from newemail where name, Fname = '$emailadd'";
and I get an error message.
Error Message:
The passed value is bixby bruce SELECT emailadd from newemail where name,
Fname = ''
You've 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
Can anyone help? TIA
That is correct.
where name, Fname =
is invalid syntax. Where name what?--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS
Computer Training Corp.
jstucklex@xxxxxxxxxxx
==================
Next Message: Query to return record only if search text is found as whole word
Blogs related to Select clause
select distinct column
select distinct column
select distinct count
select distinct count access
select distinct count
mysql select distinct count oracle
select distinct count sql
select distinct date
select distinct datetime
select distinct example
select ...
Re: mysql query
I have searched through the
MySQL notes > that I > > have but cant find out why - I think its because of the AS MatTotal > section > > of the query. > > > > Thanks in advance for feedback > > > > > >
SELECT visaudactweight.RecID, Sites.
...
select from view
... select from where in
select from where in sql
select from where like
select from where like
mysql select from where like sql
select from where
mysql select from where
mysql php
select from where not
select from where not in
select ...
select automotive group
... select benefits administrators
select benefits communications group
select benefits insurance
select benefits symetra
select benefits.com
select between
select between date
select between dates
select between dates
mysql select ...
MySQL Reference
MySQL 4.0 introduced support for unions. A UNION
clause enables the results from two
SELECT statements to be joined as a single result set. The two queries should have columns that match in type and number. Matching in type allows for
...
MySQL Performance - eliminating ORDER BY function
If you look only at ORDER BY
clause you would see first query which sorts by function is able to avoid order by while second which uses direct column value needs to do the filesort:. [sql]
mysql> explain
select * from tst where i=5 and
...