FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » mysqli --- who does the switching?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: mysqli --- who does the switching? [message #182038 is a reply to message #182008] Sun, 30 June 2013 20:56 Go to previous messageGo to previous message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma:
Member
On Fri, 28 Jun 2013 19:58:09 -0700, Scott Johnson
<noonehome(at)chalupasworld(dot)com> wrote:

> On 6/28/2013 6:50 PM, richard wrote:
>> On Fri, 28 Jun 2013 18:36:42 -0700, Scott Johnson wrote:
>>
>>> On 6/28/2013 5:39 PM, richard wrote:
>>>> Y'all keep bashing me about switching to mysqli.
>>>> Well buttheads, as I see it, it ain't MY choice.
>>>> It is the decision of those that host the servers.
>>>> After all, where does mysql or mysqli reside? On my machine?
>>>
>>> Richard, do you think us buttheads are telling you to switch just to
>>> make things harder for you?
>>>
>>> In reference to mysql_query on the following page:
>>> http://php.net/manual/en/function.mysql-query.php
>>>
>>> When you looked at the manual for mysql_query, which you say you did
>>> below, what does the following sentence mean to you?
>>>
>>> "This extension is deprecated as of PHP 5.5.0, and will be removed in
>>> the future."
>>>
>>> And then WAAAAY down the page, lets say 3-4 next sentences it tells you
>>> your alternatives with links to how to do it.
>>>
>>> If you use hostgator as a previous reply posted, so do I and I use the
>>> mysqli functions. Just follow the manual and use either the OO or
>>> procedural method depending on how your framework is set up.
>>>
>>> http://php.net/manual/en/mysqli.quickstart.dual-interface.php
>>>
>>>>
>>>> You also say I never read the frickin manuals.
>>>> BULLSHIT!
>>>
>>> Redefined BS to mean 'you are correct'.
>>>
>>> Just joking don't blow a gasket.
>>>
>>>> I read them a lot. On practically every issue I come across.
>>>> Just so that I can try to understand what it is I want to do.
>>>>
>>>> But there are those times when the manuals don't always cover what I want
>>>> to know.
>>>
>>> This last particular post WAS covered in the manual. Can you show me
>>> where it may have confused you on the order of arguments which was you
>>> problem?
>>>
>>>> I also do a ton of searching through google.
>>>> BEFORE I post here.
>>>> And sometimes I find what I need AFTER I post here.
>>>
>>> In my own opinion try to use Bing instead. But with that said, as long
>>> as you have been working on the project and the tons to searching you
>>> have done, you should have a handful of reliable sources to go to
>>> without much more engine searching.
>>>
>>>> I may have been tagged as "stupid", but that doesn't mean I am not capable
>>>> of learning.
>>>
>>> I personally have not called you stupid, but I did say you don not take
>>> notes when you are given solutions to basic function usage.
>>>
>>> I have personally however sent you to the php->mysql link on how to use
>>> the mysql_query in the past along with the warning to switch.
>>>
>>> My serious short coming is I forget many things while I am coding so I
>>> keep a notebook on some basic things and when an issue pops up, I
>>> probably have already had it solved either here or elsewhere.
>>>
>>> You may want to consider the same approach.
>>>
>>>>
>>>> On my music site, I have written the scripts to make it work the way I want
>>>> and I'd say I've done a damn decent job of it.
>>>> And if something doesn't validate, I find out why and correct it.
>>>> That's a lot more than what major powerhouses like Google can say
>>>>
>>>> Running google.com through the validator shows 25 error and 4 warnings.
>>>> mroldies.net validates with only 2 minor warnings.
>>>> msnbc.com contains 140 errors and 31 warnings.
>>>> microsoft.com contains 520 errors and 482 warnings!
>>>>
>>>> And these highly professional people get paid for their shitty ass work?
>>>>
>>
>> are you saying then that mysqli_result() should be used instead of
>> mysql_query()?
>>
>
> Your in the ball park.
>
> You use the mysqli_query() to pass the query to the engine and then use
> the mysqli_results() to parse the results from what the query returned.
>
> Now the connection function is also different as well so pay attention
> to that.
>
> Here is a link on how to do a simple query with results.
>
> http://www.php.net/manual/en/mysqli-result.fetch-assoc.php
>
> This one uses fetch_assoc but there are several different ones depending
> on how you want your results structured.
>
> Now pay attention to the manual because mysql is dual wielding. You can
> use either Object notation or Procedure notation.
>
> One major point to ummm point out. If you use the procedure notation,
> the mysqli_query order of arguments is opposite of the mysql_query.
>
> I know it sucks trying to learn a new way of doings things but in the
> long run you will thank yourself for doing so.

When I converted a 200+ page site to mysqli I found this tool to be
very helpful:

https://wikis.oracle.com/display/mysql/Converting+to+MySQLi

You do have to do some preparation of the scripts first, and some
tidyhing up afterward) but the tool then does nearly all of the
conversion automatically.

Richard Yates
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sandbox
Next Topic: Need PHP backed developer
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 00:09:10 GMT 2024

Total time taken to generate the page: 0.04756 seconds