Jump to content

Recommended Posts

I have been learning php going through this cool book. Anyway, I am halfway through this thick book and it is using mysqli to communicate with the mysql database. It is to my understanding that mysqli is returning an object this way rather than a resource. And all of the cool programs and scripts in this book are using mysqli.

 

My host does not have this feature enabled. What would be an alternative method for me to continue to use these scripts and learn using just regular mysql rather than mysqli?

 

`Jake

Link to comment
https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/
Share on other sites

so this would allow me to continue to return my connection as an object?

 

No. There are quite a few differences between mysql and mysqli. Compare them by using the manual. You can return a result resource as an object in mysql, but thats about all.

 

I want to create a wrapper class! How to I start?

 

If you want to create a wrapper class Id'e suggest you find the chapters in that book that describe how classes work. From there, you just need to create all the classes and methods required to impliment a mysqli wrapper.

 

Of course there is some functionality which you probably still won't be able to achieve.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.