Jump to content
MakeWebGames

OOP or Procedural MySQLi


Script47

Recommended Posts

I meant say you could choose again as a beginner, which one would you pick from the start?

I started with procedural, though I would never recommend to start there, I would say jump in head first in OO as that is the future

Link to comment
Share on other sites

I think procedural is considered (from what I have personally read) stepping stones for beginners to get "acquainted" with PHP/MySQLi? My personal opinion, not fact.

I started on procedural from reading a few tutorials , then i stopped with tutorials and just read through php's documentation and went with oop since then , so i would class it as a stepping stone

Link to comment
Share on other sites

It was directed to me - you don't need to know.

Sorry, thought it was to me. :) A very good share; insightful and a very good eye opener. I read some of it now, but it's nearly half four in the morning so I think it's time for bed for me!

Edited by Script47
Link to comment
Share on other sites

I started on procedural from reading a few tutorials , then i stopped with tutorials and just read through php's documentation and went with oop since then , so i would class it as a stepping stone

That was the same as me, and now personally prefer OO because I've simply grown used to it, and you don't need to include your $c = mysqli_connect(); variable in every query you try to run whereas with OO you just use say $db->.

Link to comment
Share on other sites

The problem with Mysqli is that a lot of the time the procedural and the OO functions aren't the same speed, there's a lot of cases where the procedural function is faster than the OO function, on the other hand, on a couple functions (I can't remember which) the OO version is faster due to not needing the extra var.

With Mysqli, mixing OO and Procedural is the best way to go

 

Thanks! I've been looking everywhere for an article to print onto toilet paper =)

(just kidding)

Link to comment
Share on other sites

To be honest, I think it all depends on a persons logic and preference.

I rather like PDO and have used SQL, MYSQL, MYSQLi.

For my java projects I used JDBC to connect to a MYSQL database. I think it's just preference, there is no one right answer really?

is this is in the wrong thread? I would have expected this answer to be in the PDO the way forward? thread as you haven't mention OOP or Procedural mysqli :/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...