WhiteBlade Posted August 16, 2006 Share Posted August 16, 2006 Hello all I'm trying do to a sql query and it never work. I build myself a small table showing the price of a single article that come in more then one size. My problem is that I have about 30 articles an only 5 tables that are assign to the different products. So 5 products have the same tables. The way I thought I could use to manage this is by using the products_model in product_info because I'm not using it for the rest of the site. So I made a little simple query saying this $sql_prix = "SELECT * FROM info_prix WHERE categorie=" . $product_info['products_model'] . " ORDER BY grandeur"; The problem is the fallowing. If I put categorie='cat1' everything work find cause it calling everything that have cat1 in the categorie column. When I put the code above even if the products_model is set to 1 it give me a weird error saying Unknown column 'cat1' in 'where clause' But there is something call cat1 in my gategorie column What I'm I doign wrong ?? How can I fix this :D THanks for your help Link to comment Share on other sites More sharing options...
WhiteBlade Posted August 16, 2006 Author Share Posted August 16, 2006 Well crap I've search for 3 hours before posting and now I just found what was wrong. It categorie='" . $product_info['products_model'] . "' I was using only " " and it ' " " ' that needed to be use. Now everything work. Sorry about that :blush: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.