dbTalk Databases Forums  

filters in the WHERE clause

comp.databases.mysql comp.databases.mysql


Discuss filters in the WHERE clause in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Doug Miller
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 06:36 AM






In article <8363f72b-586c-47f7-9164-6a90f1aacd31 (AT) y21g2000pro (DOT) googlegroups.com>, JRough <jlrough (AT) yahoo (DOT) com> wrote:

Quote:
Okay, I think I have the issue pinpointed. I don't understand the
nrows function entirely which is part of it .
That's the issue entirely: you don't understand the nrows function.

Reply With Quote
  #12  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 07:10 AM






On 30 June, 11:36, spamb... (AT) milmac (DOT) com (Doug Miller) wrote:
Quote:
In article <8363f72b-586c-47f7-9164-6a90f1aac... (AT) y21g2000pro (DOT) googlegroups..com>, JRough <jlro... (AT) yahoo (DOT) com> wrote:

Okay, I think I have the issue pinpointed. *I don't understand the
nrows function entirely which is part of it .

That's the issue entirely: you don't understand the nrows function.
This is JRough, she doesn't understand ANYTHING!

Reply With Quote
  #13  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 07:31 AM



JRough:

Quote:
Okay, I think I have the issue pinpointed.
Oh dear. I doubt it.
It's not easy to find a starting point on this, because there are so
many issues in your code.

But OK, let's start with the function:


Quote:
----nrows function-----
function nrows($sql) {
$sql="SELECT COUNT(*) AS cnt " . substr($sql,
strpos($sql,"FROM "));
$result=mysql_query($sql);
if ( !$result ) {die("<font color='red'>Invalid query:</font>" .
mysql_error() . "<br>$sql");}
$dbarray = mysql_fetch_array($result);
$nCnt=$dbarray['cnt'];
$cnt=($nCnt==1) ? "1 Record" : "$nCnt";
return $cnt;

}//end nrows

Could you please try and explain, in plain English without any "$"
signs or the word "sql", what you want the function to do?

The story should go like this:

a) "I want the function to return ..... to me"
b) "In order to be able to do that, the function receives ... from me"
c) "In the process, it should <fetch, calculate, compare ....>"


--
Erick

"Facts do not cease to exist because they are ignored." - Aldous Huxley

Reply With Quote
  #14  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 09:00 AM



On 30 June, 12:31, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m>
wrote:
Quote:
JRough:

Okay, I think I have the issue pinpointed.

Oh dear. I doubt it.
It's not easy to find a starting point on this, because there are so
many issues in your code.
Erick, Janis has been posting to programming groups here since 2000
and still does not have a clue about how to write code.

I suggest you give up now.

Reply With Quote
  #15  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 09:18 AM



Captain Paralytic:

Quote:
On 30 June, 12:31, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
JRough:

Okay, I think I have the issue pinpointed.

Oh dear. I doubt it.
It's not easy to find a starting point on this, because there are
so many issues in your code.

Erick, Janis has been posting to programming groups here since 2000
and still does not have a clue about how to write code.

I suggest you give up now.
Thanks for the information, CP. But if you don't mind, I would like to
offer her a chance to get things going, anyway. After all, she went
through the trouble to describe a problem to the best of her
capabilities in this newsgroup.

As soon as I feel that she doesn't give it a try hard enough, I will
give up. But has that point been reached in this thread, yet?


--
Erick

Reply With Quote
  #16  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 09:36 AM



On 30 June, 14:18, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m>
wrote:
Quote:
Captain Paralytic:

On 30 June, 12:31, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
JRough:

Okay, I think I have the issue pinpointed.

Oh dear. I doubt it.
It's not easy to find a starting point on this, because there are
so *many issues in your code.

Erick, Janis has been posting to programming groups here since 2000
and still does not have a clue about how to write code.

I suggest you give up now.

Thanks for the information, CP. But if you don't mind, I would like to
offer her a chance to get things going, anyway. After all, she went
through the trouble to describe a problem to the best of her
capabilities in this newsgroup.
And here you have got to the crux of the problem. The best of her
capabilities is way behind my 12 year old daughter's.

Another point you might notice is that her question is absolutely
blatantly obviously a php question, but her understanding is so low
that she asks it in a MySQL newsgroup.

Quote:
As soon as I feel that she doesn't give it a try hard enough, I will
give up.
I'm not saying that she doesn't try. Just that her attempts at trying
have about as much effect as me trying to lift a bus with my bare
hands. Try as I might I will never be able to manage it. Likewise, try
as she might, it is pretty obvious by now that JRough will never
master basic programming.

Quote:
But has that point been reached in this thread, yet?
Ahh you think that magically, after 10 years, in this thread she'll
suddenly grasp what it is all about! I admire your optimism, but I
can't see it happening.

Good luck trying.

Reply With Quote
  #17  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 09:56 AM



Captain Paralytic:

Quote:
On 30 June, 14:18, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
[...snip valid points against replying...]

Points taken, CP. I'll keep them in mind. But...

Quote:
Another point you might notice is that her question is
absolutely blatantly obviously a php question, but her
understanding is so low that she asks it in a MySQL newsgroup.
True. But traffic in this group isn't that high, and her question is
not that far off a MySql-topic.
We also have questions about network issues and general data modeling
issues in this group, which strictly aren't on-topic either. Yet, we
tend to discuss them as long as we don't end up talking about Scrabble,
Espresso, Politics or Motorbikes.


Quote:
But has that point been reached in this thread, yet?

Ahh you think that magically, after 10 years, in this thread she'll
suddenly grasp what it is all about! I admire your optimism, but I
can't see it happening.
:-)
One chance a thread, CP.
Unless such poster turns out to be a troll.


--
Erick

Reply With Quote
  #18  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 12:44 PM



Erick T. Barkhuis wrote:
Quote:
Captain Paralytic:

On 30 June, 12:31, "Erick T. Barkhuis" <erick.use-... (AT) ardane (DOT) c.o.m
wrote:
JRough:

Okay, I think I have the issue pinpointed.
Oh dear. I doubt it.
It's not easy to find a starting point on this, because there are
so many issues in your code.
Erick, Janis has been posting to programming groups here since 2000
and still does not have a clue about how to write code.

I suggest you give up now.

Thanks for the information, CP. But if you don't mind, I would like to
offer her a chance to get things going, anyway. After all, she went
through the trouble to describe a problem to the best of her
capabilities in this newsgroup.

As soon as I feel that she doesn't give it a try hard enough, I will
give up. But has that point been reached in this thread, yet?


Erick, it's not that she doesn't try. She really does. But she pretty
obviously has about as much talent for programming as I do for
drawing/painting - I can't draw a stick figure properly.

Like most things, programming requires a certain amount of talent. Some
people have it, and some don't. For those who don't, you can try as
hard as you can to help them. And they can do their best to get it.
But it just doesn't sink in.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #19  
Old   
Erick T. Barkhuis
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 01:07 PM



Jerry Stuckle:


Quote:
Like most things, programming requires a certain amount of talent.
Some people have it, and some don't. For those who don't, you can
try as hard as you can to help them. And they can do their best to
get it. But it just doesn't sink in.
You probably know those soccer-, football or basketball teams of kids
at age 13, that consist of boys who were sent by their parents. They
are supposed to "do something for their health", so they play in the
lowest level recreational team that is available in the region.
They practice, they work out, they can still hardly kick or throw a
ball and they are happy at halftime, when they can sit down and look
back at their accomplishments (down 14-0, but what the heck).

Wouldn't you, as a parent, be glad that there are always one or two
coaches who are willing to help the untalented at what they are trying
to do?

As long as untalented kids are serious and try hard, I'll be happy to
be the coach. As soon as such kid doesn't show interest, I'll suggest
he'd better pick up another craft.



--
Erick

"Every man who is high up likes to think he has done it all himself,
and the wife smiles and lets it go at that." - J.M. Barrie

Reply With Quote
  #20  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: filters in the WHERE clause - 06-30-2010 , 01:30 PM



Erick T. Barkhuis wrote:
Quote:
Jerry Stuckle:


Like most things, programming requires a certain amount of talent.
Some people have it, and some don't. For those who don't, you can
try as hard as you can to help them. And they can do their best to
get it. But it just doesn't sink in.

You probably know those soccer-, football or basketball teams of kids
at age 13, that consist of boys who were sent by their parents. They
are supposed to "do something for their health", so they play in the
lowest level recreational team that is available in the region.
They practice, they work out, they can still hardly kick or throw a
ball and they are happy at halftime, when they can sit down and look
back at their accomplishments (down 14-0, but what the heck).

Wouldn't you, as a parent, be glad that there are always one or two
coaches who are willing to help the untalented at what they are trying
to do?

As long as untalented kids are serious and try hard, I'll be happy to
be the coach. As soon as such kid doesn't show interest, I'll suggest
he'd better pick up another craft.



That is a completely different situation, and unrelated to what we're
discussing, Erick.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.