Minggu, 18 Agustus 2013

PHP Indonesia - Facebook: [ASK] Gan bisa gak sih klo sintak conditional sql ...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Mobile Game Development Course

Learn how to create awesome HTML5 games that run on iPhone, iPad, Android and Desktop! Sign up today for this $99 online course.
From our sponsors
[ASK] Gan bisa gak sih klo sintak conditional sql ...
Aug 19th 2013, 03:42, by Oda Aditiya Nicola

Oda Aditiya Nicola 3:42am Aug 19
[ASK] Gan bisa gak sih klo sintak conditional sql ini di jalankan? "... where post_tipe='post' and 'img'..."
Thanks

Cahya Dsn 3:44am Aug 19
maksudnya mungkin:

...WHERE post_tipe='post' AND post_tipe='img'

Muhamad Apriza Muttaqien 3:45am Aug 19
pake OR kli om... post_tipe 2 kondisi berbeda

Oda Aditiya Nicola 3:46am Aug 19
nah, sehabis itu justru ada sintak conditional lagi gan, contoh : ...WHERE post_tipe='post' AND post_tipe='img' AND term_taxonomy_id='8'...

Bisa gak ini gan Cahya Dsn

Muhamad Apriza Muttaqien 3:47am Aug 19
bukannya harusnya kyk gini ya..
...WHERE (post_tipe='post' OR post_tipe='img') AND term_taxonomy_id='8'...

Oda Aditiya Nicola 3:48am Aug 19
justru saya ingin kedua tipe itu di muncul kan baik img dan post nya gan

Muhammad Redza Syahrial Effendi 3:52am Aug 19
gini juga bisa gan :
WHERE post_tipe IN ('post', 'img') AND term_taxonomy_id='8'
? :D Oda Aditiya Nicola

Cahya Dsn 3:54am Aug 19
tergantung logik-nya

maksudnya

WHERE post_tipe='post' AND post_tipe='img' AND term_taxonomy_id='8'
// utk kondis ini kemungkinan tidak ada record yg sesuai, karena tidak mungkin 1 field punya dua nilai sekaligus (post_tipe='post' AND post_tipe='img')

atau

WHERE post_tipe IN ('post','img') AND term_taxonomy_id='8'
//utk kondisi ini hanya record yang post_tipe-nya adalah salah satu dari :'post' atau 'img';DAN term_taxonomy_id=8 aja yang retrieve datanya; bisa digunakan utk multiple OR condition utk field yg sama

ato dalam penulisan lain:

WHERE (post_tipe='post' OR post_tipe='img') AND term_taxonomy_id='8'
//utk kondisi ini hanya record yang post_tipe-nya adalah 'post' atau 'img' DAN term_taxonomy_id=8 aja yang retrieve datanya

.. alur logik-nya gimana dulu, baru di buatkan conditional query-nya cmiiw ^_^V

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar