gouseferoz
7 months ago

Data from a table where column 1 equals to column 2 of the same row

Posted 7 months ago by gouseferoz

Hi All,

I was trying to pull the data from a table where column 1 equals to column 2 of the same row.

I was using something like this,

Posts::where("name","<=>","author")->get();

here name and author are two column names, but the above query is returning null.

Can you help me what i was doing wrong.

Please sign in or create an account to participate in this conversation.