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".
alot 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 (ofcause 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 you're question and answer would probably get downvoted for not being clear, after all, you's 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 answer are the better ones until you see them all and we have seen cases where 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 as 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.
you're 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 by 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
you 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. infact
mysqli_* has a
get_result function for prepared statements and if i was to pretend i knew less that 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)