My Question About DB Class for reference
Hi! In this question above (link) I was with a problem with connection to DB with PHP CLASS. Now it's working. But, after the commands I've understood in this topic, I'm having a problem now with affected_rows.
$strSQL = $conexao->Query("INSERT INTO clientes(id_cliente,nome,checkout,metodo_pag,valor) VALUES (NULL, 'Nome Cliente', NOW(), '0', '$valorTotal')");
if ($strSQL->affected_rows == 1) {
When I execute it, the PHP returns "Trying to get property of non-object in".
What's wrong? Isn't the var $strSQL checking if $conexao->Query was done sucessful?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…