2

My first table is product and second table is user
In product table column is id, user_id,prname etc;
In user table column is id, user_name, rating.

I used this for get

$user = new User();
$user ->get();
$products = new Product();
$products ->get();

Now I want to get products order by user rating

Ankit Sharma
  • 3,923
  • 2
  • 29
  • 49
SURYA PRATAP
  • 49
  • 1
  • 6

1 Answers1

1

you should create another table for rating where product id and user id and rating value must have with primary key rating id.

then select the product according to rating value.