List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 28 2002 3:45am
Subject:Re: SELECT frmo two tables
View as plain text  
At 20:14 -0600 3/27/02, Alex Behrens wrote:
>hey guys,
>
>this mysql line doesn't seem to work:
>
>SELECT SUM(s.groundballs) AS grounders FROM stats s LEFT JOIN rahs r ON
>s.name = r.name WHERE (s.position = '$position')
>
>why not? is there somethign wrong with my syntax? it says this error:
>"Supplied argument is not a valid MySQL result resource"

You're leaving out details, namely the surrounding PHP code from within
which you're executing this statement.  My guess is that you didn't
check the result from mysql_query() to see whether or not it succeeeded.
Do so, and if it fails, print the value of mysql_error() to see what it
says.

>
>Thanks!
>--------------------------------------------
>-Alex "Big Al" Behrens
>E-mail: bigal@stripped
>Urgent E-mail: bigal-cell@stripped (Please be brief!)
>Phone: 651-482-8779
>Cell: 651-329-4187
>Fax: 651-482-1391
>ICQ: 3969599
>Owner of the 3D-Unlimited Network:
>http://www.3d-unlimited.com
>Send News:
>news@stripped

Thread
SELECT frmo two tablesAlex Behrens28 Mar
  • RE: SELECT frmo two tablesRon Jamison28 Mar
    • Re: SELECT frmo two tablesAlex Behrens28 Mar
      • Re: SELECT frmo two tablesPaul DuBois28 Mar
    • Re: SELECT frmo two tablesMike28 Mar
      • Re: SELECT frmo two tablesMichael Stassen28 Mar
    • Re: SELECT frmo two tablesAlex Behrens28 Mar
      • Re: SELECT frmo two tablesSteve Suehring28 Mar
      • Re: SELECT frmo two tablesPaul DuBois28 Mar
  • Re: SELECT frmo two tablesmike28 Mar