Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,406 members, 7,819,442 topics. Date: Monday, 06 May 2024 at 04:23 PM

Pros $ Cons Of PDO And Mysqli - Webmasters (2) - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Pros $ Cons Of PDO And Mysqli (6933 Views)

What Are The Pros And Cons Of Using An Online Payment Gateway / What Are The Pros And Cons Of Sharing Adsense With A Friend / Pros And Cons Of Buying Facebook Likes & Twitter Followers (2) (3) (4)

(1) (2) (Reply) (Go Down)

Re: Pros $ Cons Of PDO And Mysqli by exHuman: 12:58pm On May 06, 2015
Will comment in......
Re: Pros $ Cons Of PDO And Mysqli by abeltolu: 3:58pm On May 06, 2015
Thats why I love my CakePHP. No need for all this code jargons. I can build most apps half the time it will take you to do raw php.
Re: Pros $ Cons Of PDO And Mysqli by nwadiuko1(m): 4:01pm On May 06, 2015
What in blackberry's name are all ya niggies talkin about?
Re: Pros $ Cons Of PDO And Mysqli by udokpuenyi(m): 5:51pm On May 06, 2015
abeltolu:
Thats why I love my CakePHP. No need for all this code jargons. I can build most apps half the time it will take you to do raw php.

Inasmuch as frameworks accelerate the programming job, but knowing the core php codes, functions syntax and functionalities is very important in case if you run into issues that may require a custom logic. Many a times, the is always the case
Re: Pros $ Cons Of PDO And Mysqli by olareed(m): 6:04pm On May 06, 2015
Confused
Re: Pros $ Cons Of PDO And Mysqli by Nobody: 6:13pm On May 06, 2015
Usually,
$db = mysqli("host", "username", "password", "db" );

if($db->connect_errno) die('Connection failed:' .connect_error);

$sql_query = "SELECT * FROM 'tableName'";

$result = $db->query($sql_query);

while ($row = $result->fetch_array()){
//process rows here
}

$result->close();
$db->close();
Re: Pros $ Cons Of PDO And Mysqli by osile2012: 9:33am On May 07, 2015
lordjay:


OP, except i don't understand what you're talking about, but I use rowCount() to fetch number of rows in PDO and it works perfectly for me.

Returns the number of affected rows in Delete, Insert and Update statement not select in most dbases.
Re: Pros $ Cons Of PDO And Mysqli by osile2012: 1:40pm On May 07, 2015
olukenzo:
Usually,
$db = mysqli("host", "username", "password", "db" );

if($db->connect_errno) die('Connection failed:' .connect_error);

$sql_query = "SELECT * FROM 'tableName'";

$result = $db->query($sql_query);

while ($row = $result->fetch_array()){
//process rows here
}

$result->close();
$db->close();

This will work, but not for prepared statements

(1) (2) (Reply)

Tunes.ng - Nigeria's 1st Music Search Engine / The Most Popular Nigerian Bloggers / 21 Fast Tips To Get Adsense Approval For Your Blog 2017

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.