Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6738859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:25:06+00:00 2026-05-26T11:25:06+00:00

I’ve just started using ZF and there’s some very handy libraries that save me

  • 0

I’ve just started using ZF and there’s some very handy libraries that save me a lot of time but I can’t see the advantage in using their Zend_DB class over mysqli. I don’t need PDO as I will always use MySQL as DBMS. And really, how often do you change your DBMS in the middle of a project anyway?

And I’m very comfortable with SQL so don’t need their abstraction which just confuses me.

So what advantage is there over this mysqli code in my class constructors and then just SQL queries when I need them?

require_once("database_details.php");
$this->_mysql=new mysqli(DBSERVERHOST,DBUSERNAME,DBPASSWORD,DBNAME);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:25:07+00:00Added an answer on May 26, 2026 at 11:25 am

    I donno ZF, but bare mysqli is just ugly. What is your code to get some rows to populate a template?
    Let’s assume it’s just as doleful as

    $query = "SELECT * FROM myCity WHERE Name=? AND CountryCode=? AND District=?";
    $stmt = $mysqli->prepare($query);
    $stmt->bind_param("sss", $val1, $val2, $val3);
    $stmt->execute();
    $data = array();
    if ($result = $mysqli->query($query)) {
    while ($row = $result->fetch_row()) {
        $data[] = $row;
    }
    

    (that’s just plain example from the manual, with no obligatory things like error handling)

    While with some library you can make it like

    $data=$db->getArr("SELECT * FROM myCity WHERE Name=? AND CountryCode=? AND District=?"
                       $val1, $val2, $val3);
    

    just count number of queries in your usual script and feel the difference.

    Also note that you have your precious SQL intact!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.