Forum Moderators: coopster

Message Too Old, No Replies

query that works in mysql but not in php file

         

hanyaz

10:38 pm on Dec 27, 2008 (gmt 0)

10+ Year Member



Hello,
I got this query working in phpmyadmin but once i put i in the php file it does not work :

SELECT
b2b_offers.sb_title as offertitle,
b2b_offers.sb_postedon as dateposted,
b2b_country.country as country,
b2b_country.id country
FROM
b2b_offers
Inner Join b2b_members ON b2b_members.sb_id = b2b_offers.sb_uid
Inner Join b2b_country ON b2b_country.id = b2b_members.sb_country
WHERE
b2b_offers.sb_approved = 'yes'
ORDER BY
b2b_offers.sb_postedon DESC
LIMIT 0, 15

This is what i got in my php file :

mysql_fetch_array(): supplied argument is not a valid MySQL result resource

Thanks for any suggestion
Hanyaz

brotherhood of LAN

10:40 pm on Dec 27, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try mysql_query($your_query) or die(mysql_error())

and it will tell you more about the problem

hanyaz

10:44 pm on Dec 27, 2008 (gmt 0)

10+ Year Member



ouups sorry...i just realized that i did not include the
mysql_query(".....")

Thanks for reading ! I works now !
Hanyaz