0
Good afternoon to all.
I have a question about what could be going wrong in a database query in which I use templates in PHP. Based on this project: http://raelcunha.com/template/
All right, I deployed the project and everything works precisely, however, when creating a query to query the BD tables, it returns what is there, but, only a record.
$sql = mysql_query("SELECT * FROM users ORDER BY idS DESC") or die(mysql_error());
while($row = mysql_fetch_array($sql)){
$tpl->USER_SHOW_TITLE = $row['username'];
$tpl->USER_SHOW_DESC = substr($row['profi_desc'],0,125).'...';
}
I have tried several ways, but the reused is always the same! It shows only a record of the 5 that I have. :(
Do not use
Mysql_
, usePDO
orMysqli_
– Rafael Augusto
http://rberaldo.com.br/mysql-obsoleto-php/
– Rafael Augusto
If you run the
query
in your manager returns how many rows?– Roberto de Campos
He’s just adding the last one isn’t?
– Diego Schmidt
If I run the query with echo, it returns everything normal, but using the Template class method, it returns only one @Robertofagundes
– user93488