- for (i=0; i<num; i++) {
- sendnoticetouser(proxyscannick,np, "%-5s %-20s %-22s %s",PQgetvalue(pgres, i, 0),
- PQgetvalue(pgres, i, 1),
- PQgetvalue(pgres, i, 2),
- PQgetvalue(pgres, i, 3));
+ while(dbfetchrow(pgres)) {
+ sendnoticetouser(proxyscannick,np, "%-5s %-20s %-22s %s",dbgetvalue(pgres, 0),
+ dbgetvalue(pgres, 1),
+ dbgetvalue(pgres, 2),
+ dbgetvalue(pgres, 3));