1
Well, I recently created a question here at stackoverflow where I asked, how would I collect Rows from the database with the criteria I wanted.
However I found that I could use mysql_fetch_array to collect these results and they gave me the following code:
$query = "SELECT...";
$sql = mysqli_query($conexao, $query);
while($dado = mysql_fetch_array($sql)){ // Enquanto houver dados ficará em loop
$a = $dado['coluna1']; //recupera o dado do array
$b = $dado['coluna2'];
echo $a."-".$b."<br><br>"; //exibe o dado
}
I would like to know, how could I do, not to show me the first 20 results, just show me from 21 up, ie the code I have shows all the results, but I just want the results 21 up, how can I do this?
The snippet stack is used to run javascript, html and css, that is front-end, there is no reason to use "snippet stack" to put php, c++, java, c#, it will never work. Understand as a constructive criticism.
– Guilherme Nascimento
I didn’t get your comment.
– Gonçalo
You are using this https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/ in a number of your questions. The link has an explanation of the use of stacksnippet, if you just want to mark the code use the button that the icon looks like this
{ }
.– Guilherme Nascimento
Ah, I get it, thank you.
– Gonçalo
I’m gonna start wearing this {}
– Gonçalo
Why don’t you use the OFFSET on its own
query
?– Inkeliz
Your example begins with
mysqli
and ends withmysql_fetch_array
, mysqli_ is a new API andmysql_ is an old API, both do not talk.– Guilherme Nascimento