jakebur01 Posted May 8, 2007 Share Posted May 8, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/ Share on other sites More sharing options...
trq Posted May 8, 2007 Share Posted May 8, 2007 What would be an alternative method for me to continue to use these scripts and learn using just regular mysql rather than mysqli? Use the mysql extension instead. If you really wanted to get into it you could create your own wrapper class and call it mysqli. Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248046 Share on other sites More sharing options...
jakebur01 Posted May 8, 2007 Author Share Posted May 8, 2007 COOL!!!! so this would allow me to continue to return my connection as an object? Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248050 Share on other sites More sharing options...
jakebur01 Posted May 8, 2007 Author Share Posted May 8, 2007 I want to create a wrapper class! How to I start? Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248052 Share on other sites More sharing options...
trq Posted May 8, 2007 Share Posted May 8, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248055 Share on other sites More sharing options...
jakebur01 Posted May 8, 2007 Author Share Posted May 8, 2007 Would you suggest a good resource for creating your own shopping basket? Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248060 Share on other sites More sharing options...
trq Posted May 8, 2007 Share Posted May 8, 2007 Sorry, I havent read a php tutorial in years. Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248061 Share on other sites More sharing options...
jakebur01 Posted May 8, 2007 Author Share Posted May 8, 2007 Ha ha.... Thanks anyway though... I'm trying to learn.. I appreciate your help. Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248062 Share on other sites More sharing options...
trq Posted May 8, 2007 Share Posted May 8, 2007 No worries. You should find something on google, but Id'e suggest just sticking with tht book. Seriously... once you know more about the langauge, building applications becomes a simple matter of just breaking it down into smaller parts. Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248066 Share on other sites More sharing options...
jakebur01 Posted May 8, 2007 Author Share Posted May 8, 2007 I see what your saying. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/50485-solved-confused-about-mysqli/#findComment-248067 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.