Sabtu, 24 Agustus 2013

PHP Indonesia - Facebook: $check=mysql_query("SELECT `id` FROM `$bname` WHER...

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/ 
$check=mysql_query("SELECT `id` FROM `$bname` WHER...
Aug 24th 2013, 17:00, by Black Genies

Black Genies 5:00pm Aug 24
$check=mysql_query("SELECT `id` FROM `$bname` WHERE `edate`=''");//<<this query is ri8. I run it in mysql nd it return id=5
if (mysql_num_rows($check) == 0) {
echo "No rows found";
}
else{
while ($row = mysql_fetch_array($check)) {
echo $row["id"];
}
the error msg for this code is
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C
please comment in english. from pak :)

Bang Roy Han 5:05pm Aug 24
what about WHERE edate=''?
Try...
$aa = mysql_query("SELECT id FROM name WHERE date='2013-01-05'");
$xx = mysql_num_rows($aa);
if ($xx > 0){
// found
}else{
// not found
}

Black Genies 5:08pm Aug 24
edate is the name of the column... nd i want to select tht row whose edate column is empty...

Freddy Sidauruk 5:27pm Aug 24
that's must be your query bro :) wait is it table's name $bname ?

Black Genies 5:30pm Aug 24
yes..

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