Page 1 of 1

Query help please

Posted: Fri Aug 08, 2003 2:39 pm
by rizzah00
Hello, brief description of my mysql tables are

owners
-user_id
-email
-aim
-team_id

teams
-team_id
-location
-name
-pre

here's my query that i use

Code: Select all

<?php   

mysql_connect("localhost", "user", "pass");   
mysql_select_db("database");   
$query = "select t.team_id, o.team_id, o.email, t.name, o.aim, t.location, from owners o, teams t WHERE o.team_id = t.team_id";  
   
$result = mysql_query($query);   
while($row = mysql_fetch_array($result))&#123;   


      echo "&#123;$row&#1111;'location']&#125;";  
      echo "nbsp;";  
      echo "&#123;$row&#1111;'name']&#125;";  
      echo " ";  
      echo "&#123;$row&#1111;'email']&#125;";  
      echo " ";  
      echo "&#123;$row&#1111;'aim']&#125;";  
      echo "<br>";  

   
&#125;   
?>
and heres my error message
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/styckx/public_html/maddenworld/owners.php on line 25
any help in remedying the situation would be GREATLY appreciated

Posted: Fri Aug 08, 2003 2:44 pm
by kendall
Yo man...

team AS t and owners AS o....but i think you will probably would have figured it out by now