PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 30th, 2002, 05:15 PM
bogglebeats bogglebeats is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 bogglebeats User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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);

Reply With Quote
  #2  
Old October 30th, 2002, 05:24 PM
bob0099 bob0099 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: manchester,n.h.,usa
Posts: 172 bob0099 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 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);
}

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Problem with Queries


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway