A self answered Q/A is just like any other Q/A posted on the site yet harder as generally when you ask a question you don't know the answer and you ask after having done your own research and found nothing.
Removing the up/down vote on the question would remove the user feedback of clarity, usefulness and research effort. What you don't want is people self answering "how to i echo in PHP" because they were too lazy to google or code dump their project which had an error in it saying "this code doesn't work" then a code dump answer of the fixed code saying "this code worked".
A lot of the time though I think self-answered Q/A come down to usefulness of the question and answer being on the site and their clarity despite us always saying that the 2 should be voted for indeterminately of one another (of course we don't do that when we downvote answers to off-topic questions).
Using "how to i echo in PHP" if the answer was an alternate form of output without using
echo your question and answer would probably get downvoted for not being clear, after all, you just posted a very round about way for
echo for what reason? How would this be helpful to anyone?
But if you posted a question like "how do i output from the server like echo" and post your round-a-bout way of doing it but showing data that your method actually takes less memory and time than
echo people might upvote them as they are the kind of people who want to save milliseconds from processing.
And instead of displaying the question's score when browsing, display the answer instead.
Assuming you mean the answer's score (as opposed to posting an answer in that tiny space) what determines the answer when there are multiple ones? Currently when you browse the list of questions you see how many answers have been posted and if the asker as shared which answer helped them. You don't see which answers are the better ones until you see them all and we have seen cases where the accepted answer wasn't the best answer (and easily foreseeable problem is a new user to PHP accepting an answer prone to SQL Injection which is downvoted for it while another similar answer is more robust against it using prepared statements).
Since the Q/A in question was deleted while I was typing out a bunch of comments I'll make it into an answer here
Your question has a couple of problems wrong with it by itself.
First off, as indicated by Walt's answer your question relies on a third party link. Should that site go down for any reason no one would be able to understand what you're referring too.
Secondly, you ask in general how to use Datatables server side with PHP when the link you posted appears to do that already. According to a comment you made
but the example given isn't really that clear, since they use
ssp.class.php without really going into depth what it did. Which confused the hell out of me when I looked at it the first few times.
your real problem seems to come from the use of
ssp.class.php and not understanding how it works in relation to the database connection. After a bit of searching I was able to find the Github page and confirmed my assumption that
ssp.class.php was just some custom made wrapper class to alter the returned data format, in this case it's using PDO and changing it from the the usual PDO Object to an array.
Your answer didn't help in clarifying
ssp.class.php either because in the only PHP code you posted as an example, when the database magic would occur you just put
// Run $statement through MySQL again, saving all $results
As such i can only assume you assumed that the user is blindly using
ssp.class.php rather than say using
PDOStatement::execute both of which return results from a MySQL Database but in different formats. In fact
mysqli_* has a
get_result function for prepared statements and if I was to pretend I knew less than what I know, "Run $statement through MySQL again, saving all $results" could mean to me that I can just run
$result = $statement->get_result() and it'll all work fine (haven't tried to see if that's the case but I doubt it given the possible return values).