Minggu, 13 Oktober 2013

PHP Indonesia - Facebook: yang paling gw benci kl disuruh perbaiki script da...

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/ 
Manage your social media

Best social media tool for image publishing to Facebook and Twitter. Look amazing and delight your followers. Get 40% off when you sign up today.
From our sponsors
yang paling gw benci kl disuruh perbaiki script da...
Oct 14th 2013, 02:33, by Gunawan Mujur Wibisono

Gunawan Mujur Wibisono 2:33am Oct 14
yang paling gw benci kl disuruh perbaiki script database kl bentuknya begini

$sql=mysql_fetch_array(mysql_query("SELECT * FROM tabel_transaksi WHERE MONTH( tgl_transaksi ) = '$bulan'
AND YEAR( tgl_transaksi ) = '$tahun'"));

kl dah nongol >> "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL.....
repotkhan..
mending dipecah2 aja deh
$sql="xxxxx";
$r=mysql_query($sql); $row=mysql_fetch_array($r);

en kl diperbaiki jadi pdo khan tinggal
$sql="xxxxx";
$q=$pdo->query($sql);$hasil7 = $q->fetch(PDO::FETCH_ASSOC);

Eki Syaeful Martha Adhi 2:44am Oct 14
(PDO::FETCH_ASSOC) buat apa ?

Freddy Sidauruk 2:45am Oct 14
(y)(y) (y) (y) (y) (y)

Hendri Prayugo 2:45am Oct 14
masih pada level ngamatin :v

Muhammad Taufiq Hidayat 2:58am Oct 14
fetch assoc dari 0.
fetch array dari 1, itu menurut pemahaman ku

Eki Syaeful Martha Adhi 2:59am Oct 14
ow kalo PDO:: nya buat apa ?

Hero Kage 3:00am Oct 14
masih level kecebong ... ngelamun aja liat nya.eheheh .. sabar gan rekan mu iya

Mochammad Yusuf Apriyadi 3:00am Oct 14
Iya pernah nemu kayak gitu jadinya malah pusing baca scriptnya @@

Gunawan Mujur Wibisono 3:01am Oct 14
PDO di atas adalah class static.. sama seperti parameter ke 2 dalam mysql_fetch_array($res, {parameter kke 2} )

Eki Syaeful Martha Adhi 3:01am Oct 14
saya masil level telor, jadi nanya nanya, biar netasnya jadi naga :v

Gunawan Mujur Wibisono 3:01am Oct 14
PDO::FETCH_ASSOC>> agar hasilnya keluar pake nama saja
gk termasuk hasil pake angka

Eki Syaeful Martha Adhi 3:01am Oct 14
ow iya lupa itu pake framework apa ? CI ?

Gunawan Mujur Wibisono 3:02am Oct 14
bukan.. gk pake fw

Eki Syaeful Martha Adhi 3:07am Oct 14
trus tanda -> ? ato cuman pake OOP ? CMIIW

Gunawan Mujur Wibisono 3:09am Oct 14
$pdo itu hasil deklarasi krn ini khan pake PDO

Karl Met SolitudeMan 3:14am Oct 14
fetch(PDO::FETCH_ASSOC); << bru liat yg bgni? tuh buat apa yah ?

Gunawan Mujur Wibisono 3:15am Oct 14
fetch_style
Controls how the next row will be returned to the caller. This value must be one of the PDO::FETCH_* constants, defaulting to value of PDO::ATTR_DEFAULT_FETCH_MODE (which defaults to PDO::FETCH_BOTH).

PDO::FETCH_ASSOC: returns an array indexed by column name as returned in your result set


PDO::FETCH_BOTH (default): returns an array indexed by both column name and 0-indexed column number as returned in your result set


PDO::FETCH_BOUND: returns TRUE and assigns the values of the columns in your result set to the PHP variables to which they were bound with the PDOStatement::bindColumn() method


PDO::FETCH_CLASS: returns a new instance of the requested class, mapping the columns of the result set to named properties in the class. If fetch_style includes PDO::FETCH_CLASSTYPE (e.g. PDO::FETCH_CLASS | PDO::FETCH_CLASSTYPE) then the name of the class is determined from a value of the first column.


PDO::FETCH_INTO: updates an existing instance of the requested class, mapping the columns of the result set to named properties in the class


PDO::FETCH_LAZY: combines PDO::FETCH_BOTH and PDO::FETCH_OBJ, creating the object variable names as they are accessed


PDO::FETCH_NUM: returns an array indexed by column number as returned in your result set, starting at column 0


PDO::FETCH_OBJ: returns an anonymous object with property names that correspond to the column names returned in your result set

Gunawan Mujur Wibisono 3:18am Oct 14
ada lg yg namanya cursor_orientation dan offset

Eki Syaeful Martha Adhi 3:22am Oct 14
uh ternyata masih banyak yang blm saya ketahui

Gunawan Mujur Wibisono 3:25am Oct 14
pdo khan menangani lebih dari 1 database.. bahkan pdo tidak support hitung jumlah data yg di panggil aka count_rows

Andi Malik Rizki Maula 5:44am Oct 14
nubi mau nanya gan. maksudnya nggak support ngitung gimana ya? bukannya ada method rowCount() di class PDOStatement? kcuali klo query-nya pke mode unbuffered yg nggak bisa dihitung jumlah row-nya berapa

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