...

View Full Version : Displaying Results



Darren06
06-01-2004, 03:05 AM
I have a problem where I want to display a table row (<tr>) tag every three results mysql puts out but do not know what the function is. Can anyone help?

Spookster
06-01-2004, 03:56 AM
There is no function to do this. Doesn't really require a function anyways. It's just a matter of how to write your loops to do this. Post what code you have so far.

duniyadnd
06-01-2004, 03:58 AM
I have a problem where I want to display a table row (<tr>) tag every three results mysql puts out but do not know what the function is. Can anyone help?

$i = 0;
while ($i < $limit) {

if ($i % 3 == 0) {

echo '<tr>';

}

// extra stuff

if ($i % 3 == 0) {

echo '</tr>';

}

$i++;

}

Darren06
06-01-2004, 05:37 AM
Thank you! :cool: I have been looking for that forever.

Spookster
06-01-2004, 05:43 PM
$i = 0;
while ($i < $limit) {

if ($i % 3 == 0) {

echo '<tr>';

}

// extra stuff

if ($i % 3 == 0) {

echo '</tr>';

}

$i++;

}

That's kind of a convoluted way of doing it. Also where is $limit being set at?

krycek
06-01-2004, 07:41 PM
That's kind of a convoluted way of doing it. Also where is $limit being set at?

hmmmmm.

I don't think that's the point. Duniyadnd answered the question helpfully, and provided code that helped the person in need. I don't think he had to supply a fully-functioning module. He just provided what was needed, and the person was happy.

On the other hand, it strikes me that you, Spookster, have yet to contribute anything productive to this thread. You have not said anything helpful, and you have not answered the original question. AND you have unfairly criticised Duniyadnd.

For as long as I have been a member here, CF has been about helping people. Ask yourself who fitted that description more, and then chew on the answer for a while. And before you point out the many, many times you *have* helped people here (I'm very much aware of them) just stop, and think about what I'm trying to say.

Perhaps then you will post a less 'convoluted' method of acheiving the desired result, which may lead to happy discussion etc. Or not, seeing as the questioner is already satisfied.

duniyadnd
06-01-2004, 07:44 PM
That's kind of a convoluted way of doing it. Also where is $limit being set at?

You're kidding me right?

Spookster
06-02-2004, 12:40 AM
hmmmmm.

I don't think that's the point. Duniyadnd answered the question helpfully, and provided code that helped the person in need. I don't think he had to supply a fully-functioning module. He just provided what was needed, and the person was happy.

On the other hand, it strikes me that you, Spookster, have yet to contribute anything productive to this thread. You have not said anything helpful, and you have not answered the original question. AND you have unfairly criticised Duniyadnd.

For as long as I have been a member here, CF has been about helping people. Ask yourself who fitted that description more, and then chew on the answer for a while. And before you point out the many, many times you *have* helped people here (I'm very much aware of them) just stop, and think about what I'm trying to say.

Perhaps then you will post a less 'convoluted' method of acheiving the desired result, which may lead to happy discussion etc. Or not, seeing as the questioner is already satisfied.

First of all if you have a problem with me then you could have just as easily sent me a PM about it. In my opinion you are now in violation of our rules of being hostile and confrontational to other members. I would suggest you review our rules before posting any more here at codingforums. Consider this your warning. It seems to me that by posting your comments to me you did not contribute anything productive to this thread as you have accused me of doing.

Second of all I was in the process of providing help to this member when duniyadnd jumped into the conversation. But maybe you missed that part.

Thirdly I was not criticizing his post. I was stating a fact and then asked a question. What he posted was not the best way to code that and if he hadn't of jumped in then I would have provided the less convoluted way of coding it.

krycek
06-02-2004, 01:07 AM
First of all if you have a problem with me then you could have just as easily sent me a PM about it. In my opinion you are now in violation of our rules of being hostile and confrontational to other members.
I have been polite, and I made my point clearly, and in a non-confrontational way.



I would suggest you review our rules before posting any more here at codingforums. Consider this your warning.
I would do, if it were your place to warn me. I have been a member here long enough to know the rules extemely well, and I have not broken, or even bent, any of them. I am well-respected here, and I have provided help and services to an awful lot of people on these boards. If you don't like me pointing out that you criticised someone unfairly, that's fine. However, I don't think flaming me with an impotent warning is polite, helpful, or constructive. In fact, I would call it hostile.



It seems to me that by posting your comments to me you did not contribute anything productive to this thread as you have accused me of doing.
It would have been productive if you had taken my comments the right way. Let's say it wasn't Duniyadnd, but someone else, a bit newer. What you said could well have put them off helping someone else in future, or put them off posting here at CF. In which case, surely it can be considered productive for you to think about what I was trying to say.



Second of all I was in the process of providing help to this member when duniyadnd jumped into the conversation. But maybe you missed that part.
Obviously so... I only read the thread, I have not been aware of any help you were providing outside of it. In which case you have my apologies. But as for Duniyadnd 'jumping in' - what the heck? Are you serious? I don't see your name on the thread as designated respondee, plus you know as well as I do that everyone is free to post advice as they see fit. I don't see anything wrong with what Duniyadnd posted. Rather, it was what the person was looking for. Which is why I posted in the first place - what's your problem? Why criticise him?



Thirdly I was not criticizing his post. I was stating a fact and then asked a question. What he posted was not the best way to code that and if he hadn't of jumped in then I would have provided the less convoluted way of coding it.
Hmmmm, once more I apologise if you were not meaning to be critical. But it sure looked that way, and Duniyadnd seemed to think so too, from his response.

I really don't know what your problem is, but you've annoyed both Duniyadnd and myself, needlessly. If you consider his method convoluted, why not post your own method so he can compare it, and learn from it if need be? Or maybe debate the pros and cons of each? Without doing that, it sure sounds like unnecessary criticism.

So, rewind, don't get hot under the collar just because someone like myself tries to point out that something you said may not be perfect (yes, you get things wrong at times you know, just like the rest of us) and instead of (in my opinion) throwing your weight around by giving a 'warning' (which is without cause, substance, or backing) just chill!

Now, how to break the strange tension that seems to have arisen, that I am so unused to here? Hmmm, time for something funny, perhaps...

"I've never had major knee surgery on any other part of my body," -- Winston Bennett, University of Kentucky basketball forward.

Spookster
06-02-2004, 01:14 AM
Good job. You've completely derailed this thread.



I would do, if it were your place to warn me.


Last time I checked I am the moderator of this forum. So yes it is my place to warn you.

Here refresh your memory of our rules.



Penalty for abusing/breaking the above guidelines will result in action taken either by a moderator or admin. Sometimes it's as simple as your post being edited out (which does not always equate to a penalty, rather, just a reminder), other times, you will be contacted and warned. In more severe cases, you will be banned immedately and without notice. However banned, it is permanent.


This thread is now locked.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum