Jump to content

About ifnull function


GOKU

Recommended Posts

Can iffnull with subquery ?

 

Example

 

 

select a.id,a.nama,(select nama_file from mr_foto x where x.id_property=a.id and utama=1 and hide_member=0),a.jenis,a.alamat,

  concat(b.nama,', ',c.nama),harga,(ifnull(select x.nilai from tr_spek_property x where x.id_property=a.id and x.id_spek=4,'-'))

  from mr_property a,mr_kota b,mr_propinsi c

 

 

occurs error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select x.nilai from tr_spek_property x where x.id_property=a.id and x.id_spek=4,' at line 2

 

What the correct sql? Thank you ...

Link to comment
https://forums.phpfreaks.com/topic/106274-about-ifnull-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.