mysql - How to fetch two records from subquery -


i want fetch 2 records subquery gives error below u tried

below works :

select id, (select color tblcolor pid=id) color form maintable 

not works

select id, (select color,price tblcolor pid=id) form maintable 

please me solution it

from question, seems you're looking for:

select t1.id, t2.color, t2.price maintable t1 inner join tblcolor t2 on t1.id = t2.pid 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -