last day (14 days later) » 

9:50 AM
1
A: Can I use a plugin to display (on front-end) first twenty of database rows at a time, and next twenty when user clicks "Next" button?

Luke BriggsYes This is called pagination - a quick search for "ajax pagination mysql php" or similar brings up a wide range of options. I can't recommend any particular one as your question is too broad; I can only reasonably go as far as a definition. Internally they use the MySQL LIMIT keyword which may...

 
(S)he's asking if there's a "plugin" that would do the job instead of having to re-invent the wheel for 100th time. - And than there's you explaining what it's called (s)he is looking for (hint: (s)he knows!), and how to do it manually (hint: The question was how to avoid that).
 
@icecub the word 'pagination' is not mentioned in the question, suggesting the OP didn't know what it's called. Searching for it brings up lots of premade options. I can't recommend any particular one because I don't know enough about their specific use case (and it's all just a quick search away once you know what to search for).
 
Pagination wasn't named. I'll give you that. The problem is: You're not answering the question. You're elaborating on the subject and giving advise on where OP might find an answer to the problem. That kind of information is supposed to be in a comment. Answers are there to give an objective, direct answer to the question. Since that's impossible because, as you probably have figured out now, this is a primarily opionion based question.
 
@icecub It's clearly an opinion based question - I knew that from the start. Anybody who doesn't know what 'pagination' is would find relevance in this answer so that's why I went for an answer instead of a comment.
 
I understand your reasening m8. I'm not trying to pick on you here or something :) I'm trying to discourage you from giving answers like these because they set a bad example and don't abide to SO's guidelines. There's a reason for comments to exist. To make sure that answers are used only to answer the question. PS: that downvote was not from me.
 
9:50 AM
@icecub You're missing the general point of the guidelines; quoting them: "Any answer that gets the asker going in the right direction is helpful," - unopinionated relevance is worthwhile, and this ticked the box for me.
@Solace No problem! Feel free to accept the answer so other users know it's been answered :)
 
@Solace I'm glad the answer helped you out. But since the question was different than the answer given, I still feel this was more a lucky guess than an appropiate answer. Nevertheless, opionions differ and I simply have a different one regarding this :)
 
@Solace - That's the tricky part (and why your question got downvoted and this mini-comment-debate even exists) because it's not specific enough. SO isn't for that kind of broad question - instead, it's more for you researching something that works for you, then asking more specific questions about that particular thing. It avoids opinions and outright advertising.
 
I'm with @LukeBriggs on this one. There was never a perfect answer possible to begin with. It's the same as asking for a search engine. I tell you Google and someone else gives you Yahoo!. Both are good answers. Neither is perfect. It's opinion based. You could never objectively accept an answer.
 
@Solace A question like this almost always has the expectation of a particular plugin; quoting you a few mins ago: "they can include the name of a plugin or something like that, and that will answer the question perfectly" - you probably weren't originally expecting a yes/no answer (but I've just dropped a yes in there anyway :P)
 
@Solace Haha that one made me smile. Yes, technically you are correct, but we both know a simple "yes" or "no" answer on your question wouldn't have survived at all here on SO. Your question would've been closed very fast as it wouldn't help anyone in the future
@LukeBriggs I don't know if this question will survive (it might still be closed as too broad), but you've defended your actions with good reasoning and kept doing your best to turn this into a good answer as much as possible. Therefor I'll give you a +1 :)
@Solace I ment that positively. It's not easy to make me smile. Everyone makes mistakes and you learn from them. Next time you'll be able to formulate your questions better. Like perhaps: This is what I want, but I don't know exactly what it's called and that got me stuck in finding an answer for myself. That's a perfectly valid question :)
 
9:50 AM
@Solace I would imagine it'll survive - I went off the assumption that it has some relevance to search engine users who don't know "what this page thing" is called; you could rephrase it a little to better suit that. SO mods do the same thing :) Icecub I agree - this whole thing has made me smile too and it's a wonderful pleasure to see people taking quality seriously here.
 
@Solace As for extra encouragement: It's strongly advised to turn a bad question into a good one! You really are encouraged to edit your question and change it with the advise I gave you. That's not me talking, that's one of SO's guidelines :)
 
@Solace I've just made an edit suggestion with a better question for you as an example - you should be able to see the edit and optionally accept it (or it'll potentially get accepted by a peer review)
 
@Both of you: May I suggest that if the edit to the question is accepted, we all delete this ridiculously long list of comments as it doesn't add up to the subject at hand?
 
@icecub I'm amazed the 'move to chat' option didn't show up a while back! I completely agree; the size of this wall of comments in comparison to the answer is hilarious :P
 
It showed up for me now! xDDD
Like.. WHY NOW?!?!?!
 
9:50 AM
Lol was that pure coincidence? Awesome :P
When it popped up I was like "how'd you do that!?" :P
 
Well you answered me and I was about it reply and it popped, lol xD
I guess the thresshold for answers on moving to chat is a lot higher than it is for questions
I really felt bad for Solace there. I really didn't mean any harm with that comment
 
Lol awesome - Yeah it suprisingly seems that way; hopefully Solace accepts the edit because there's totally something salvageable in that question :P Ikr lol
I read it probably how you meant it but it might've gotten a little mangled in translation there :P
 
Ye I know. I hope she accepts it before it goes through peer review. Edits to questions that add information or change the question itself by anyone else but the OP is a big no go on SO
 
Yep - that's what I was thinking/ why I bothered commenting about it, particularly as it's a downvoted question anyway
In the review process though it asks if you think a question can be salvaged and I'm pretty sure that one can be; it just depends which user lands on it first so it's a bit of a russian roulette there
 
Yup. It's why I have a couple of disputed flags. Worse part is usually someone with more rep does exactly what I flagged about after it, haha
 
9:59 AM
Lol ahh the SO community at its best and worst :P I've ended up getting a bit caught up in swatting down SQL injections because oh my gosh so many questions are vulnerable :P
A few days ago a user went dick-pic crazy on the academia SO, of all places lol
 
Ghehe I have something funny for you then
Read this answer to a very bad question of mine. You'll be seeing vulnerabilities all over the place after that: stackoverflow.com/questions/38509334/…
That came out wrong. My answer to someone elses very bad question xD
 
Brilliant lol - that's one of the few answers that actually broadly covers them, earned yourself a +1 there :P
 
It was a fun project for me in the past. It was only then when I realised how extremely vulnerable upload scripts on websites are
Haha thanks :)
 
Yep lol - that answer still has vulnerabilities but they're everywhere so ¯_(ツ)_/¯ lol
 
Yup. It's also the reason why I gave up answering questions containing mysql_* functions. If I have to tell someone he's vulnerable to SQL injection one more time, I might actually lose it :P
 
10:08 AM
Ikr, if SO answers could have a signature, it would be "your SQL is probably injectable" :P
 
Though I once did find a tutorial about prepared statements where the writer actually wrote a completely secure function for mysql_* functions to fully support prepared statements. I was really impressed with that work
 
Great, people do care lol - my favourite ones have got to be where the designers just don't expect an injection attempt to ever show up, such as speed cameras :P
Lil' Bobby tables got a private plate. :P
 
Whahaha I actually got my teacher in my software engineer masters to use that car picture in his lectures xDD
 
Haha brilliant - I don't even know how the cameras can accept such a long plate lol; utter failure on so many levels (but oh so satisfying :P)
 
Well, I guess Solace has given up on that question. I'm gonna start deleting all my comments
I think it never really worked and was done more as a joke. But then again, in some remote country it might very well have worked
 
10:16 AM
Alrightey I'll join in too - I wasn't quite expecting my Sunday to start like this but it's been an entertaining one none-the-less (nice to meet you by the way!); Yeah - one I've actually seen working is confusing those self-service barcode scanners at retail checkouts
 
Nice to meet you too m8!
Ye I've heard about that one in the news a while back
I've also deleted the chat link, so if you leave, that'll be the end of this room. Except for logs ofc
 
Cinemas have started issuing QR code e-tickets too so I'm just a little curious at seeing what would happen if they're swapped for ones that open various exciting websites :P Great alright - all my comments are gone too so it looks a little less rediculous now
 
Usually when I critasize someone in an answer I get a "f*ck off, I'm here for rep and I do what I want". You didn't do that but defended your position with clear reasoning. It brightened my day that there are still serious ppl between, sorry for saying it, all those 1 rep idiots spamming all over the site
 
I very nearly didn't answer at all (I took a good few minutes deciding between a comment and an answer) but eventually decided in favour on the basis that there doesn't actually appear to be a question that basically asked "what is [pagination] called?" so it seemed like a nice opportunity to help those searchers out
 
Sometimes you even see them going to one of the questions that was asked at the beginning of SO with hundreds or thousends of upvotes and good, clear answers. Only to copy that accepted answer and answer again.. like.. whut? xD
 
10:27 AM
But yep I totally agree - my personal preference just puts that info relevance factor higher up than a question being too broad - if there's an underlying question there, with some information that might be useful, then an answer seems suitable. Lol I know right - a high rep guy did that to me yesterday :P
I answered a question, he (incorrectly) answered after, I dropped a comment, he lifted my answer and got accepted >.< lol
 
Ye I agree. It was also a mistake on my part. Looking at the 2k+ rep on Solace, I subconsciously assumed a basic knowledge like "pagination" existed. I shouldn't have done that
 
Yep that played a big factor too; I thought the same thing lol - I'd hazard a guess she's had a hot network question lucky hit or something
 
You can actually report that on meta you know? If a high rep does something like that and it clearly shows, it's highly frowned upon and action will be taken
Perhaps. Or simply knowledge in something totally different. Like C# or C++. Pagination is a lot less common there unless you work with large databases as well
 
Wow ok then, nope, just a ton of questions with a few 30+'s :P Yea; it didn't seem particularly worthwhile at the time - it was irritating sure, but so long as the person got the answer then that's all I really care about
Yea - she comes across as a non-native English speaker so I'd imagine a word like pagination is a tough one to retain anyway
 
Well, another lesson learned: Don't assume knowledge based on reputation. It means nothing
Another rule I live by: Knowledge is not the same as being smart, ghehe
 
10:35 AM
Yep! That's a nice rule (this is where I post it on some answer and gain all the credit ;) lol)
 
Pff just 32 more rep for me and heaven finally opens
It allows me to edit any question and answer without the need of approval from the OP or peer reviews. They all become direct, yay!
Don't start mass upvoting m8! I know you want to help, but dont!
SO's security might pick you up as socket pup account upvoting randomly and block you
 
Lol, well, I figured I would give you a little boost - awesome people deserve something on a sunday :)
 
Thanks, I really appreciate the thought! Just don't want you to get in trouble
 
No problem! SO's security is actually fairly relaxed about that sort of thing so every little helps right :)
 
Ye I know :) Thanks a lot! I'm just looking out for the ppl I like here. The good ones are rare, we don't want to lose them :P
On a side note
 
10:44 AM
Thanks! I saw that you're from the Netherlands by the way? Stunning country :)
 
I'm really proud of my gold badge! :D Not to have a gold one, but this one in particulary, ghehe
Ye I am :)
 
Brilliant hehe - I got the 'Tenatious' one a few days ago; it's not quite the same as your gold one but it's a start! :P
 
"Zero score accepted answers: more than 10 and 25% of total" - Meaning I have a lot of answers that were good, just no one upvoted them xDD
Yup! That's the one in the right direction! I think it's one of the few brilliant ones to have, haha
 
Lol it's certainly a nice thing to be rewarded for though! It again just shows that rep doesn't really mean much - the people with the best answers can show up anywhere :)
Ikr lol
I'm British by the way (and no we don't hate you!! :P)
 
It feels a bit renegade to me: Take that high rep users! You all didn't feel like upvoting me to include me in your elite circle, but everyone was very happy with my answers, ghehe xD
Oh lol, we don't hate you either here, haha
We do hate your beer though :X
 
10:52 AM
I've personally worked on software projects for the EU so I find the whole political situation both terrifying and hilarious at the same (at how distorted it is) time haha
 
There's so few alcohol in it, we feel like drinking root beer. Though I've heard it's a different story if you leave the popular tourist places
 
Haha Ikr - a German man, French man and English man show up at a bar and have a drinking contest. The English man is the only one who's still sober at the end of it :P
Yea - go to the places that serve either continental beers or micro-breweries that break all the rules lol :P
 
But on the political situation, I really do hope Brexit will work out for the best in the end. We had a study done for Nexit. The result was that it would indeed become better, but not before it got a lot worse first
 
Yeah I totally agree - the economy has been taking quite the hit so far; a few of my previous university peers have already moved too - ultimately though the UK has got to try and create something that works for everyone and I sure hope they can pull that off within the next 10 years :P
The tricky part is the whole situation opened the door for a bit of a far-right take over, so we've now ended up with the "snoopers charter" passing - I find that a lot more concerning than the EU situation
 
I really hope it for you man. Well, for all of us really. Don't think Brittain leaving the EU only hits Brittain. I'm afraid the consequences will reach much further than that eventually
I'm not up to date enough to know what this "snoopers charter" is?
 
11:05 AM
Yea - difficult time for Europe, but I believe enough in all Europeans that things will work out fine in the end. In short, the "most extensive surveillance bill ever passed in a Western democracy"
 
Ah, following the US now are we? Sigh
 
Theresa May proposed it in ~2014 - she's now Prime Minister so naturally it's now just about become law :/
 
Well you have one bit of luck on your side
Since you're programmer, you know a thing or 2 about anonymity and encryption. At least for a little while longer, you probably aren't spied upon your internet activities
 
Yep! :P It's unfortunate that it's even necessary (and it's particularly odd that many British people are completely fine with it)
 
Well they are like "I'm not doing anything illegal, so I don't care"
Well I'm not doing anything illegal (perhaps the download of a serie once in while) either. But I've got some very private pictures of my lady on my computer here and I sure as hell don't want any government figurehead looking at them! That he's "not interested" in that, is completely besides the point
 
11:14 AM
Yeah - the whole "nothing to hide, nothing to fear" concept - it falls apart pretty quickly when you ask for all their passwords :P
Yea - especially as Government memo's show that such surveillance is completely ineffective at doing its actual stated task
 
Exactly! So ye, I agree with you. They want to spy on us? Alright, but that means we get to see everything they're keeping a secret as well!
 
Yep exactly! And guess what? The law specifically excludes all Government officials. It's completely hypocritical
I manage networks that deal with kids so I had to read through the 300+ pages of the bill and it makes no exceptions for young people either
 
Sigh. Well I guess I'll just start tunneling all my traffic through TOR into a VPN somewhere in the middle of nowhere with 256bit SSL encryption. I wish them good luck xD
 
Yep me too! lol
 
And just to annoy them: All files in Truecrypt containers with hidden layers :D
Not that doing these things will keep my browsing very viable, but everything for the greater good! xD
 
11:21 AM
Similarly they can't force us to hand over data that we don't record, so all our UK servers will no longer be holding any customer information :P
Yep! lol; Everybody has a right to privacy, not just Government officials
 
Ye we had an annoying law regarding that a few years back
 
They're not getting my information, and they're not forcing me to hand over my customers information either :p
Yea I remember that one - From what I remember it was quite strongly against?
 
First, no matter the suspection, the government had to find evidence of your wrongdoing on your hard drive! Now they no longer have to. If they have sufficient evidence, even though NOTHING can be found at the suspect, it's enough
 
O.o that's rediculous!
 
Ye. Same as our "home copy" law. Basicly this law ment that we could legally download anything, even if it was from an illegal source
Then the EU came in: That law is wrong and from now on it's illegal!
 
11:26 AM
Statistically, you're twice as likely to be killed by a champagne cork than a terrorist, yet they use it as an excuse to attempt passing invasive things like that - yay overlords :P
Meanwhile, in the UK: "The EU is evil and must be stopped - it has authority over the UK Government" :P
stares at the snoopers charter "..and you consider that a bad thing because..?" :P
 
I have to give it to the Dutch government on that one though: "We have no way to enforce that law without invading the populations privacy. So we keep the law and pay your damn fine for doing so. Good bye!"
 
Lol awesome :P
What is the general feeling there towards the EU by the way? Do you think a 'Nexit' would happen if everybody was asked?
 
It was asked actually. We were the first country to considder it I think. But the population voted against it
Also because the government official that wanted this "Wilders" failed to mention it would get a lot worse before it got better. He just said it would get better
 
Ah awesome - there's hope yet :P That's interesting - there was a lot of mis-information on both sides of the debate here; people were generally aware that it would get worse first
 
Ye but now that they're actually starting to feel how much "worse" it's getting, and this is only the start, a lot of them are probably regretting their vote
 
11:34 AM
Suprisingly what's actually happening is people think that it's all just false information on the news :P
It's all just being made up to "make us stay in the EU" :P
 
lol! Look at your chocolate Toblerone bars in the supermarket ppl! That should give you an idea xD
When companies actually start doing something so silly as that, you might start to think that something is very, very wrong!
 
Haha ikr! I'm a bit of a chocolate fan and the awkward things happening to e.g. Toblerone are crazy :P
Maltesers - ironically has the slogan "The lighter way to enjoy chocolate" - lost a few grams in weight after the vote lol
the amount of actual chocolate went down some 15% I believe :p
 
I guess they think it's all part of conspiricy. That the EU is pressing those companies to do that. That they don't really have to xD
 
Yea lol - it's either loose weight or bump up the price, and it's not hard to see why they did it lol :P
 
Well I really hope it works out in the end. The vote for Trump might have put you 2nd place on "most stupid decisions made in 2016 by countries), but it's still 2nd place.. :P
 
11:41 AM
Yea very true lol
A lot of it comes down to jobs and the particularly awkward thing is neither Trump or Brexit can actually fix that, but ¯_(ツ)_/¯ lol
 
Just keep an eye out for it. If it gets to worse, get the hell out of there before it's to late and other countries no longer accept you
 
I think I'd rather just get rich, buy and island, and watch the WW3 nukes fly overhead :P
 
lol xD
Invest in weapons. It might actually get you there xD
 
Yea very true lols :P
 
Anyway, I've got to go on my daily business here. I've returned you a little favor on one of your answers ;) Feel free to stay in touch if you like! My email is on my profile
 
11:46 AM
Going to be an interesting decade for sure lol - Thanks! :P Yea absolutely - it's been really wonderful to meet you! :)
 
The feeling is mutual m8! Have a nice day!
 
You too - enjoy the rest of the weekend! :)
Oh hey quick update lol
The edited question just got accepted XD
 

last day (14 days later) »