seb213 Posted January 24, 2007 Author Share Posted January 24, 2007 [quote author=craygo link=topic=123868.msg512650#msg512650 date=1169672650]That usually means the sql statement is wrongput this in after the sql[code]$query_Recordset2 = "SELECT * FROM products_description JOIN products ON products_description.products_id = products.products_id WHERE products.products_id ='$pid'";echo $query_Recordset2."<br>";[/code]And post what the wuery isRay[/quote]or if you ment for me to put this on my actual page, this is what i get:[color=red]SELECT * FROM products_description JOIN products ON products_description.products_id = products.products_id WHERE products.products_id ='278'Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /www/snackerz/html/bulke/products/index.php on line 8[/color] Quote Link to comment Share on other sites More sharing options...
seb213 Posted January 24, 2007 Author Share Posted January 24, 2007 All of you guys SAVED my fuckin DAY!Special Thanks to : [color=red]The Little Guycraygodgiberson[/color]What happend was i wrote my QUERY wrong, i had the wrong realtaionship, so i took the query [color=red]dgiberson[/color] gave me, and modified that, and what the hell do you know, im back in business. [color=green]$pid = $_REQUEST['products_id'];This is what i needed :$query_Recordset2 = "SELECT * FROM products_description pd INNER JOIN products p ON pd.products_id = p.products_id WHERE p.products_id = $pid";[/color]Thanks so much for your help. Quote Link to comment Share on other sites More sharing options...
dgiberson Posted January 25, 2007 Share Posted January 25, 2007 good stuff, glad to help.... i really suggest creating your queries in phpMyAdmin or MySQL Query Browser first, cause it will return you a little more info versus running it in your php code, the standard not a valid argument error doesn't really help you troubleshoot the query. Then porting it to php becomes a snap Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.