|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 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 Can anyone ? TIA |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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"; > > > $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 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 > > Can anyone ? 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@attglobal.net ================== |
|
![]() |
| Outils de la discussion | |
|
|