0

Please help me out in fetching into rows.

$results = mysqli_query($db, "SELECT base.*, charge.id, cloud.id, mask.id, sense.id.* 
      FROM base INNER JOIN charge ON base.id = charge.id 
                INNER JOIN cloud ON base.id = cloud.id 
                INNER JOIN mask ON base.id = mask.id 
                INNER JOIN sense ON base.id = sense.id ");

I'm getting an error a {Error: Unknown table 'sense.id'}. Even though there is an error.

How to correct this?

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
CodeNew
  • 39
  • 6
  • Where is the join for `sense` table if it is a table? – frz3993 Oct 21 '19 at 04:16
  • You select `sense.id.*` which means select every column from table `sense.id`. Change it to `sense.*` if you want to select everything from table sense or `sense.id` if you want to select just the `id` column. – catcon Oct 21 '19 at 04:21

1 Answers1

0

please try sense.* inplace of sense.id.*

"SELECT base.*, charge.id, cloud.id, mask.id, sense.* 
      FROM base INNER JOIN charge ON base.id = charge.id 
                INNER JOIN cloud ON base.id = cloud.id 
                INNER JOIN mask ON base.id = mask.id 
                INNER JOIN sense ON base.id = sense.id "
Mannu saraswat
  • 1,061
  • 8
  • 15
  • i replaced that * sense.id with sense* and now it's showing " Warning: mysql_num_rows() expects parameter 1 to be resource, object " how to correct that?? – CodeNew Oct 21 '19 at 05:08