Re: [PHP-DB] PDO Vs MySQLi Vs SQL Queries.

2012-02-28 Thread Donahue Trevor
Hi Vinay,
No, using native mysql_* statement isn't always faster. Advantages are
obvious, as mentioned in the article you shared (object mapping, security,
performance), there's always things like caching and other stuff you don't
want to reinvent the wheel for and on big projects tend to be really
useful. So imho it's better using things like pdo.
Another thing... try using ORM http://redbeanphp.com sliced my dev type in
4 :)

On Tue, Feb 28, 2012 at 6:22 AM, Vinay Kannan viny...@gmail.com wrote:

 Hey Guys,

 I came across this article.

 http://net.tutsplus.com/tutorials/php/pdo-vs-mysqli-which-should-you-use/

 Though I've been working with PHP for over 2 yrs, i never bothered to use
 the techniques mentioned in the articles like this.
 What i do for DB connections and queries..is just simple sql queries in
 php,
 $sql={sql query};
 $runsql=mysql_query($sql);

 What i do take care is to clean the user inputs before querying the DB.

 Is this a good way? Coz i've seen more experienced programmers using the
 techniques mentioned in the article, with PDOs, MySQLi etc...

 I always thought there is a chance that these might slow the querying
 process?

 Please advice.

 Any help is appreciated.

 Thanks,
 Vinay Kannan.



Re: [PHP-DB] PDO Vs MySQLi Vs SQL Queries.

2012-02-28 Thread Vinay Kannan
Hi Trevor,

Thank You for your suggestion, yeah i think caching is something i
definitely want to look at and something thats important, and there is a
big project coming up, its pretty much the biggest i've taken up so far,
theres also a mobile app for android which needs to be done, so caching
definitely is something i wanna look at.

I've also downloaded RedBean, will play around on the same, looks Cool ! :)

Thanks,
Vinay

On Tue, Feb 28, 2012 at 4:31 PM, Donahue Trevor donahue.tre...@gmail.comwrote:

 Hi Vinay,
 No, using native mysql_* statement isn't always faster. Advantages are
 obvious, as mentioned in the article you shared (object mapping, security,
 performance), there's always things like caching and other stuff you don't
 want to reinvent the wheel for and on big projects tend to be really
 useful. So imho it's better using things like pdo.
 Another thing... try using ORM http://redbeanphp.com sliced my dev type
 in 4 :)

 On Tue, Feb 28, 2012 at 6:22 AM, Vinay Kannan viny...@gmail.com wrote:

 Hey Guys,

 I came across this article.

 http://net.tutsplus.com/tutorials/php/pdo-vs-mysqli-which-should-you-use/

 Though I've been working with PHP for over 2 yrs, i never bothered to use
 the techniques mentioned in the articles like this.
 What i do for DB connections and queries..is just simple sql queries in
 php,
 $sql={sql query};
 $runsql=mysql_query($sql);

 What i do take care is to clean the user inputs before querying the DB.

 Is this a good way? Coz i've seen more experienced programmers using the
 techniques mentioned in the article, with PDOs, MySQLi etc...

 I always thought there is a chance that these might slow the querying
 process?

 Please advice.

 Any help is appreciated.

 Thanks,
 Vinay Kannan.





[PHP-DB] PDO Vs MySQLi Vs SQL Queries.

2012-02-27 Thread Vinay Kannan
Hey Guys,

I came across this article.

http://net.tutsplus.com/tutorials/php/pdo-vs-mysqli-which-should-you-use/

Though I've been working with PHP for over 2 yrs, i never bothered to use
the techniques mentioned in the articles like this.
What i do for DB connections and queries..is just simple sql queries in php,
$sql={sql query};
$runsql=mysql_query($sql);

What i do take care is to clean the user inputs before querying the DB.

Is this a good way? Coz i've seen more experienced programmers using the
techniques mentioned in the article, with PDOs, MySQLi etc...

I always thought there is a chance that these might slow the querying
process?

Please advice.

Any help is appreciated.

Thanks,
Vinay Kannan.