DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Data Engineering
  3. Databases
  4. Tutorial Series: Using PHP's MySQLi API

Tutorial Series: Using PHP's MySQLi API

John Esposito user avatar by
John Esposito
·
Nov. 07, 11 · Interview
Like (0)
Save
Tweet
Share
8.90K Views

Join the DZone community and get the full member experience.

Join For Free

MySQL and PHP work wonders together, but sometimes getting them to talk can be a little less than obvious.

The official documentation of MySQLi, the improved MySQL API for PHP 5.0 and MySQL 4.1, can be a little terse. (Sometimes user comments are needed to complete the information.) But PHP draws people for its community too -- not just because the language is accessible and fast.

Lots of tutorials for MySQLi exist (here's a good one), but this new series from Ulf Wendel looks like one of the most efficient.

So far Ulf has posted three quick tutorials, in rapid succession (starting November 3rd).

  • The first, on stored procedures, just gives examples of IN, INOUT, and OUT parameters.
  • The second, on prepared statements, is a little more dense, but necessarily so: prepared statements are more efficient in the right circumstances (when executing one many times), and less efficient in others (when executing only once): in many cases, a multi-INSERT will be cheaper to run. To help you decide whether to use prepared statements, Ulf provides a thorough tabular breakdown of the exact differences between prepared and non-prepared statements in MySQLi.
  • Finally, the third post, on multiple statements in one statement string, explains how to reduce cliend-server roundtrips -- a technique that can pose some security problems, if handled incorrectly, but Ulf warns you about that.

More posts will be forthcoming -- soon, if Ulf's past performance indicates anything about future results. Stay tuned if you like what you've seen so far.

 

API PHP

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How Elasticsearch Works
  • Distributed Tracing: A Full Guide
  • mTLS Everywere
  • What Are the Benefits of Java Module With Example

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: