Skip to content

Tag: sql

SQL SELF JOIN return null if not exist

Recently, I got a table A like this: I try to SELF JOIN this table by I got this What I expect is when VoucherID doesn’t have any reciprocal account, that record will return null, like this Is there any elegant approach? Thanks all. Answer Why not just use aggregation? You could also do this using left …

Display each sql db row in a single php page

I’m trying to display each single row from my db as a separated unique page, so when I click on the row link (which I don’t even know what it is until now) it directs me to a new page with the content of this row or some of the content as I desire.. So I created a new php