|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with Queries
cant get the $result query to execute. keep getting a parse error.
$newartist = mysql_query("SELECT Distinct City, Genre_Select FROM Musicians_Network WHERE Date_Created > curdate()-7", $db); if ($myfirstrow = mysql_fetch_array($newartist)) { do { $result = mysql_query("SELECT Contact FROM Musicians_Network WHERE (City = ". $myfirstrow['City'] ." or Genre_Select = ". $myfirstrow['Genre_Select']) ." and Updates = 'Yes'",$db); |
|
#2
|
|||
|
|||
|
RE: Problem with Queries
try getting rid of the "do" and put the code between the braces
if ($myfirstrow = mysql_fetch_array($newartist)) { $result = mysql_query("SELECT Contact FROM Musicians_Network WHERE (City = ". $myfirstrow['City'] ." or Genre_Select = ". $myfirstrow['Genre_Select']) ." and Updates = 'Yes'",$db); } |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Problem with Queries |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|