I would think either would work. I'd have to take a look at the page to debug. Are you using the DataBridge beta? That is where the syntax:
$notas_mes_anterior = new WA_MySQLi_RS("notas_mes_anterior",$xitau,3,3);
should be supported. That wouldn't have worked in older versions. The first sample I would think would work in older versions as well as the latest. If you give me FTP access and a URL to reproduce I'll debug it and figure out what is going wrong.