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
Switch to threaded view of this topic Create a new topic Submit Reply
mysqli --- who does the switching? [message #181999] Sat, 29 June 2013 00:39 Go to next message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma: 0
Senior Member
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?

You also say I never read the frickin manuals.
BULLSHIT!
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.
I also do a ton of searching through google.
BEFORE I post here.
And sometimes I find what I need AFTER I post here.

I may have been tagged as "stupid", but that doesn't mean I am not capable
of learning.

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?
Re: mysqli --- who does the switching? [message #182001 is a reply to message #181999] Sat, 29 June 2013 01:11 Go to previous messageGo to next message
Lew Pitcher is currently offline  Lew Pitcher
Messages: 60
Registered: April 2013
Karma: 0
Member
On Friday 28 June 2013 20:39, in comp.lang.php, noreply(at)example(dot)com 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.

FWIW, the mysqli() interface was introduced with PHP 5.0 (says
http://www.php.net/manual/en/mysqli.overview.php)

As far as I can tell, your website is hosted by HostGator, who advertise
that their hosting services provide (among other things) PHP 5.
(http://www.hostgator.com/shared, under the "Programming and Database
Features" heading)

It looks like your hosting service provides the PHP level that supports
mysqli(). So, ISTM, there's nothing stopping you from writing your PHP
scripts to use the mysqli() interface.

[rant snipped]

HTH
--
Lew Pitcher
"In Skills, We Trust"
Re: mysqli --- who does the switching? [message #182002 is a reply to message #182001] Sat, 29 June 2013 01:23 Go to previous messageGo to next message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma: 0
Senior Member
On Fri, 28 Jun 2013 21:11:56 -0400, Lew Pitcher wrote:

> On Friday 28 June 2013 20:39, in comp.lang.php, noreply(at)example(dot)com 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.
>
> FWIW, the mysqli() interface was introduced with PHP 5.0 (says
> http://www.php.net/manual/en/mysqli.overview.php)
>
> As far as I can tell, your website is hosted by HostGator, who advertise
> that their hosting services provide (among other things) PHP 5.
> (http://www.hostgator.com/shared, under the "Programming and Database
> Features" heading)
>
> It looks like your hosting service provides the PHP level that supports
> mysqli(). So, ISTM, there's nothing stopping you from writing your PHP
> scripts to use the mysqli() interface.
>
> [rant snipped]
>
> HTH

the script I used had mysqli and it would not work that way.
Re: mysqli --- who does the switching? [message #182003 is a reply to message #181999] Sat, 29 June 2013 01:36 Go to previous messageGo to next message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma: 0
Senior Member
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?
>
Re: mysqli --- who does the switching? [message #182004 is a reply to message #182003] Sat, 29 June 2013 01:50 Go to previous messageGo to next message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma: 0
Senior Member
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()?
Re: mysqli --- who does the switching? [message #182005 is a reply to message #182003] Sat, 29 June 2013 01:54 Go to previous messageGo to next message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma: 0
Senior Member
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?
>>

Or would this be the more proper way of doing mysql_query()?

http://www.php.net/manual/en/mysqli-result.data-seek.php
Re: mysqli --- who does the switching? [message #182007 is a reply to message #181999] Sat, 29 June 2013 02:37 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
</killfile>

richard wrote:

> I may have been tagged as "stupid", but that doesn't mean I am not capable
> of learning.

Then *finally* *show* *us[tm]* that you are capable of learning:

- Use a proper From
- RTFM before you post
- STFW before you post
- Do not insult the people who have helped you and could help you again
- etc.

See also: <http://www.catb.org/~esr/faqs/smart-questions.html>

Or FOAD.

<killfile>
Re: mysqli --- who does the switching? [message #182008 is a reply to message #182004] Sat, 29 June 2013 02:58 Go to previous messageGo to next message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma: 0
Senior Member
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.
Re: mysqli --- who does the switching? [message #182009 is a reply to message #182005] Sat, 29 June 2013 03:02 Go to previous messageGo to next message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma: 0
Senior Member
On 6/28/2013 6:54 PM, richard wrote:
> On Fri, 28 Jun 2013 18:36:42 -0700, Scott Johnson wrote:

<snip>

>
> Or would this be the more proper way of doing mysql_query()?
>
> http://www.php.net/manual/en/mysqli-result.data-seek.php
>

I have not used data_seek but it just seems like a way to place a
pointer in the result set. Not 100% since I just glanced at it.

Look at the fecth_???? methods but with the mysqli_query not the
mysql_query. The (i) is the key.

And if you have issues getting it to work just throw the code you are
using up here and I am sure someone can help since you are updating your
code.
Re: mysqli --- who does the switching? [message #182010 is a reply to message #182009] Sat, 29 June 2013 03:43 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Scott Johnson wrote:

> On 6/28/2013 6:54 PM, richard wrote:
>> On Fri, 28 Jun 2013 18:36:42 -0700, Scott Johnson wrote:
> <snip>
>> Or would this be the more proper way of doing mysql_query()?
>>
>> http://www.php.net/manual/en/mysqli-result.data-seek.php
>>
>
> I have not used data_seek but it just seems like a way to place a
> pointer in the result set. Not 100% since I just glanced at it.
>
> Look at the fecth_???? methods but with the mysqli_query not the
> mysql_query. The (i) is the key.
>
> And if you have issues getting it to work just throw the code you are
> using up here and I am sure someone can help since you are updating your
> code.

Sorry to kill the mysqli hype here, but the most intuitive and easiest to
learn database API to replace mysql is by far PHP Data Objects (PDO), which
is stable since PHP 5.1 (2005) [1]. It is also database-agnostic. Use that
instead of mysql(i) if possible. And avoid servers running PHP < 5.3 if you
value your data. The last PHP 5.2.x was released more than two years ago.
[2]


[1] <http://php.net/pdo>
[2] <http://php.net/ChangeLog-5.php>


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Re: mysqli --- who does the switching? [message #182011 is a reply to message #182007] Sat, 29 June 2013 09:40 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 29/06/13 03:37, Thomas 'PointedEars' Lahn wrote:
> </killfile>
>
> richard wrote:
>
>> I may have been tagged as "stupid", but that doesn't mean I am not capable
>> of learning.
> Then *finally* *show* *us[tm]* that you are capable of learning:
>
> - Use a proper From
> - RTFM before you post
> - STFW before you post
> - Do not insult the people who have helped you and could help you again
> - etc.
>
> See also: <http://www.catb.org/~esr/faqs/smart-questions.html>
>
> Or FOAD.
>
> <killfile>
'Speak roughly to your little boy,
And beat him when he sneezes:
He only does it to annoy,
Because he knows it teases.'

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: mysqli --- who does the switching? [message #182012 is a reply to message #182011] Sat, 29 June 2013 11:11 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
On 29-06-2013 11:40, The Natural Philosopher wrote:
> Speak roughly to your little boy,
> And beat him when he sneezes:
> He only does it to annoy,
> Because he knows it teases

hmm, WTF has a quoot from the fifth chapter of Alice in Wonderland to do
here?.....
Re: mysqli --- who does the switching? [message #182013 is a reply to message #182012] Sat, 29 June 2013 12:30 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 29/06/13 12:11, Luuk wrote:
> On 29-06-2013 11:40, The Natural Philosopher wrote:
>> Speak roughly to your little boy,
>> And beat him when he sneezes:
>> He only does it to annoy,
>> Because he knows it teases
>
> hmm, WTF has a quoot from the fifth chapter of Alice in Wonderland to
> do here?.....
>
>
Hint: Richard. Pointed ears.Think....

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: mysqli --- who does the switching? [message #182014 is a reply to message #182002] Sat, 29 June 2013 13:13 Go to previous messageGo to next message
Doug Miller is currently offline  Doug Miller
Messages: 171
Registered: August 2011
Karma: 0
Senior Member
richard <noreply(at)example(dot)com> wrote in news:2y4pesy8rb8f$.7qsm5tfx3b6l$.dlg@
40tude.net:

> On Fri, 28 Jun 2013 21:11:56 -0400, Lew Pitcher wrote:
>> It looks like your hosting service provides the PHP level that supports
>> mysqli(). So, ISTM, there's nothing stopping you from writing your PHP
>> scripts to use the mysqli() interface.
>
> the script I used had mysqli and it would not work that way.
>
In other words... you didn't write it, and you don't have a clue how to fix it, eh?
Re: mysqli --- who does the switching? [message #182015 is a reply to message #182014] Sat, 29 June 2013 14:27 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 29/06/13 14:13, Doug Miller wrote:
> richard <noreply(at)example(dot)com> wrote in news:2y4pesy8rb8f$.7qsm5tfx3b6l$.dlg@
> 40tude.net:
>
>> On Fri, 28 Jun 2013 21:11:56 -0400, Lew Pitcher wrote:
>>> It looks like your hosting service provides the PHP level that supports
>>> mysqli(). So, ISTM, there's nothing stopping you from writing your PHP
>>> scripts to use the mysqli() interface.
>> the script I used had mysqli and it would not work that way.
>>
> In other words... you didn't write it, and you don't have a clue how to fix it, eh?
Hehe.

reminds me of a friend of mine walking into a company that had written a
vast commercial package in GWBASIC.

She said 'I am not touching this till there is a flow chart' She drew
it on a roll of wallpaper and pinned it to the wall. It was still there
when she left a couple of years later.;

--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
Re: mysqli --- who does the switching? [message #182016 is a reply to message #182010] Sat, 29 June 2013 15:39 Go to previous messageGo to next message
Scott Johnson is currently offline  Scott Johnson
Messages: 196
Registered: January 2012
Karma: 0
Senior Member
On 6/28/2013 8:43 PM, Thomas 'PointedEars' Lahn wrote:
> Scott Johnson wrote:
>
>> On 6/28/2013 6:54 PM, richard wrote:
>>> On Fri, 28 Jun 2013 18:36:42 -0700, Scott Johnson wrote:
>> <snip>
>>> Or would this be the more proper way of doing mysql_query()?
>>>
>>> http://www.php.net/manual/en/mysqli-result.data-seek.php
>>>
>>
>> I have not used data_seek but it just seems like a way to place a
>> pointer in the result set. Not 100% since I just glanced at it.
>>
>> Look at the fecth_???? methods but with the mysqli_query not the
>> mysql_query. The (i) is the key.
>>
>> And if you have issues getting it to work just throw the code you are
>> using up here and I am sure someone can help since you are updating your
>> code.
>
> Sorry to kill the mysqli hype here, but the most intuitive and easiest to
> learn database API to replace mysql is by far PHP Data Objects (PDO), which
> is stable since PHP 5.1 (2005) [1]. It is also database-agnostic. Use that
> instead of mysql(i) if possible. And avoid servers running PHP < 5.3 if you
> value your data. The last PHP 5.2.x was released more than two years ago.
> [2]
>
>
> [1] <http://php.net/pdo>
> [2] <http://php.net/ChangeLog-5.php>
>
>
> PointedEars
>

Not sure if I would call it a hype, just giving an alternative to what
is being used that I am familiar with.

PDO may be an option worth exploring.
Re: mysqli --- who does the switching? [message #182018 is a reply to message #182015] Sat, 29 June 2013 17:19 Go to previous messageGo to next message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma: 0
Senior Member
On Sat, 29 Jun 2013 15:27:12 +0100, The Natural Philosopher wrote:

> On 29/06/13 14:13, Doug Miller wrote:
>> richard <noreply(at)example(dot)com> wrote in news:2y4pesy8rb8f$.7qsm5tfx3b6l$.dlg@
>> 40tude.net:
>>
>>> On Fri, 28 Jun 2013 21:11:56 -0400, Lew Pitcher wrote:
>>>> It looks like your hosting service provides the PHP level that supports
>>>> mysqli(). So, ISTM, there's nothing stopping you from writing your PHP
>>>> scripts to use the mysqli() interface.
>>> the script I used had mysqli and it would not work that way.
>>>
>> In other words... you didn't write it, and you don't have a clue how to fix it, eh?
> Hehe.
>
> reminds me of a friend of mine walking into a company that had written a
> vast commercial package in GWBASIC.
>
> She said 'I am not touching this till there is a flow chart' She drew
> it on a roll of wallpaper and pinned it to the wall. It was still there
> when she left a couple of years later.;

Heh.
I took a computer class once that was supposed to educate us on the
workings of BASIC. It was really a waste of my time because I knew more
about it than the instructor did.

One guy had written a piece of code that was something like:
If a<>b and c<>d then do this.
The instructor had no clues why it did not work.

When I wanted to do an input statement, I always included the semicolon at
the end.
input a$;
She always marked it as wrong.

For those of you who may still be interested in BASIC, you might want to
take a look at "liberty basic". www.libertybasic.com
It's BASIC on steroids and functions inside windows.
I find it very helpful when wanting to make a huge list of something.
LB also has some similarities to PHP.
Re: mysqli --- who does the switching? [message #182019 is a reply to message #181999] Sat, 29 June 2013 17:25 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
On Fri, 28 Jun 2013 20:39:47 -0400, richard wrote:

[validator]

> google.com [contains] 25 error and 4 warnings.
> msnbc.com contains 140 errors and 31 warnings.
> microsoft.com contains 520 errors and 482 warnings!

The validation results of other websites are irrelevant to whether your
website works. Validation detects a lot of issues that may prevent a
website working correctly. If you want us to help with your html,
validate it first.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
Re: mysqli --- who does the switching? [message #182020 is a reply to message #182013] Sat, 29 June 2013 18:39 Go to previous messageGo to next message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma: 0
Senior Member
On 29-06-2013 14:30, The Natural Philosopher wrote:
> On 29/06/13 12:11, Luuk wrote:
>> On 29-06-2013 11:40, The Natural Philosopher wrote:
>>> Speak roughly to your little boy,
>>> And beat him when he sneezes:
>>> He only does it to annoy,
>>> Because he knows it teases
>>
>> hmm, WTF has a quoot from the fifth chapter of Alice in Wonderland to
>> do here?.....
>>
>>
> Hint: Richard. Pointed ears.Think....
>

Do i have to read the book,
or can i watch the movie too,
to understand it....
Re: mysqli --- who does the switching? [message #182021 is a reply to message #182015] Sat, 29 June 2013 21:37 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <kqmqs0$k4u$1(at)news(dot)albasani(dot)net>,
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:

> On 29/06/13 14:13, Doug Miller wrote:
>> richard <noreply(at)example(dot)com> wrote in
>> news:2y4pesy8rb8f$.7qsm5tfx3b6l$.dlg@
>> 40tude.net:
>>
>>> On Fri, 28 Jun 2013 21:11:56 -0400, Lew Pitcher wrote:
>>>> It looks like your hosting service provides the PHP level that supports
>>>> mysqli(). So, ISTM, there's nothing stopping you from writing your PHP
>>>> scripts to use the mysqli() interface.
>>> the script I used had mysqli and it would not work that way.
>>>
>> In other words... you didn't write it, and you don't have a clue how to fix
>> it, eh?
> Hehe.
>
> reminds me of a friend of mine walking into a company that had written a
> vast commercial package in GWBASIC.
>
> She said 'I am not touching this till there is a flow chart' She drew
> it on a roll of wallpaper and pinned it to the wall. It was still there
> when she left a couple of years later.;

Flow charts are a waste of time. Must be 45 years since I did one.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: mysqli --- who does the switching? [message #182026 is a reply to message #181999] Sat, 29 June 2013 22:56 Go to previous messageGo to next message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma: 0
Senior Member
Don't worry about the "bashers"; they don't know any better most of the
time. That said, if there are pieces of advice you don't wish to follow,
just say so an move on. BEWARE however, of dismissing good,
well-intentioned advice; think about WHY they "bash" you about switching
to MYSQL and respond logically and without emotion; leave emotion to the
others; it'll never get you anywhere on a newsgroup.

And returning name calling with more name calling is NEVER productive if
you're really looking for assistance.



On 2013-06-28 8: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?
>
> You also say I never read the frickin manuals.
> BULLSHIT!
> 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.

What DO you want to do? It seems to have been trimmed from the
discussion or I just don't see it. I don't have time to reconstruct this
whole thread to see what your first queries were. Always keep your quest
visible in your posts.

>
> But there are those times when the manuals don't always cover what I want
> to know.

Not unusual: it's good to explain WHAT you've read or researched; others
may be prone to suggest other places where you could get more targetted
advice.

> I also do a ton of searching through google.
> BEFORE I post here.
> And sometimes I find what I need AFTER I post here.

No help; no details of what you did, nothing to try to add for you to
further your research.

>
> I may have been tagged as "stupid", but that doesn't mean I am not capable
> of learning.

Who cares? Don't sweat the emotional comments of others. It's not useful
and is always off topic.

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


When you're trying to make such comparins, they will fail because you
can only scrape PART of their code to submit. You have no idea what's
missing in the sense of code because a lot of it happens server-side and
you'll never see it; that's why they're done server-side: Hacker and
Cracker protection is one reason.
IMO you're comparing apples & oranges and the oranges' data isn't valid.

I would hope you've been able to take this as the constructive criticism
it's intended to be and not in a derogatory sense, which it is not.
>

Good luck,
Re: mysqli --- who does the switching? [message #182034 is a reply to message #182021] Sun, 30 June 2013 10:12 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
On 29/06/13 22:37, Tim Streater wrote:
> In article <kqmqs0$k4u$1(at)news(dot)albasani(dot)net>,
> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
>> On 29/06/13 14:13, Doug Miller wrote:
>>> richard <noreply(at)example(dot)com> wrote in >
>> news:2y4pesy8rb8f$.7qsm5tfx3b6l$.dlg@
>>> 40tude.net:
>>>
>>>> On Fri, 28 Jun 2013 21:11:56 -0400, Lew Pitcher wrote:
>>>> > It looks like your hosting service provides the PHP level that
>> supports
>>>> > mysqli(). So, ISTM, there's nothing stopping you from writing
>> your PHP
>>>> > scripts to use the mysqli() interface.
>>>> the script I used had mysqli and it would not work that way.
>>>>
>>> In other words... you didn't write it, and you don't have a clue
>> how to fix > it, eh?
>> Hehe.
>>
>> reminds me of a friend of mine walking into a company that had
>> written a vast commercial package in GWBASIC.
>>
>> She said 'I am not touching this till there is a flow chart' She
>> drew it on a roll of wallpaper and pinned it to the wall. It was
>> still there when she left a couple of years later.;
>
> Flow charts are a waste of time. Must be 45 years since I did one.
>
well it was 35 years ago.

they make sense in procedural code of a certain sort


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
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 next message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma: 0
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
Re: mysqli --- who does the switching? [message #182039 is a reply to message #182013] Sun, 30 June 2013 20:59 Go to previous messageGo to next message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma: 0
Member
On Sat, 29 Jun 2013 13:30:03 +0100, The Natural Philosopher
<tnp(at)invalid(dot)invalid> wrote:

> On 29/06/13 12:11, Luuk wrote:
>> On 29-06-2013 11:40, The Natural Philosopher wrote:
>>> Speak roughly to your little boy,
>>> And beat him when he sneezes:
>>> He only does it to annoy,
>>> Because he knows it teases
>>
>> hmm, WTF has a quoot from the fifth chapter of Alice in Wonderland to
>> do here?.....
>>
>>
> Hint: Richard. Pointed ears.Think....

Please, that's 'richard.'

Richard
Re: mysqli --- who does the switching? [message #182084 is a reply to message #182021] Sat, 06 July 2013 21:33 Go to previous messageGo to next message
Alf Christophersen is currently offline  Alf Christophersen
Messages: 1
Registered: July 2013
Karma: 0
Junior Member
On 29.06.2013 23:37, Tim Streater wrote:

> Flow charts are a waste of time. Must be 45 years since I did one.
>

By opening the source in Code visual to Flowchart, I get a flowchart
drawn immediately and it is nice to use for refactoring, at least with
big procedures
Re: mysqli --- who does the switching? [message #182086 is a reply to message #182084] Sun, 07 July 2013 21:15 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Alf Christophersen wrote:

> On 29.06.2013 23:37, Tim Streater wrote:
>> Flow charts are a waste of time. Must be 45 years since I did one.
>
> By opening the source in Code visual to Flowchart, I get a flowchart
> drawn immediately and it is nice to use for refactoring, at least with
> big procedures

“the source in Code visual to Flowchart”?


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Re: mysqli --- who does the switching? [message #182091 is a reply to message #182086] Mon, 08 July 2013 19:02 Go to previous message
Richard Yates is currently offline  Richard Yates
Messages: 86
Registered: September 2013
Karma: 0
Member
On Sun, 07 Jul 2013 23:15:29 +0200, Thomas 'PointedEars' Lahn
<PointedEars(at)web(dot)de> wrote:

> Alf Christophersen wrote:
>
>> On 29.06.2013 23:37, Tim Streater wrote:
>>> Flow charts are a waste of time. Must be 45 years since I did one.
>>
>> By opening the source in Code visual to Flowchart, I get a flowchart
>> drawn immediately and it is nice to use for refactoring, at least with
>> big procedures
>
> “the source in Code visual to Flowchart”?
>
>
> PointedEars

http://download.cnet.com/Code-Visual-to-Flowchart/3000-2212_4-10072756.html
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Sandbox
Next Topic: Need PHP backed developer
Goto Forum:
  

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

Current Time: Thu Nov 21 14:30:38 GMT 2024

Total time taken to generate the page: 0.02271 seconds