Sziasztok.
szerk.:
new i2=0;
for(new i=1; i < MAX_TELEFON; i++)
{
if(telinfo[telszam] == 0)
{
format(query, sizeof(query), \"SELECT telefonszam,egyenleg,tulajdonos FROM `telefon` WHERE `tulajdonos` = \'kriszrap\' \");
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row(line))
{
i2++;
sscanf(line,\"p<|>dds[64]\",telinfo[telszam],telinfo[telegyenleg],telinfo[teltulaj]);
printf(\"%d %d %s %d %d\",telinfo[telszam],telinfo[telegyenleg],telinfo[teltulaj],i);
}
}
}
eredmény:
[21:18:36] 701603673 0 kriszrap 1
[21:18:36] 709314934 0 kriszrap 1
[21:18:36] 709135641 0 kriszrap 1
[21:18:36] 302918319 0 kriszrap 1
[21:18:36] 209824147 0 kriszrap 1
[21:18:36] 701603673 0 kriszrap 2
[21:18:36] 709314934 0 kriszrap 2
[21:18:36] 709135641 0 kriszrap 2
[21:18:36] 302918319 0 kriszrap 2
[21:18:36] 209824147 0 kriszrap 2
[21:18:36] 701603673 0 kriszrap 3
[21:18:36] 709314934 0 kriszrap 3
[21:18:36] 709135641 0 kriszrap 3
[21:18:36] 302918319 0 kriszrap 3
[21:18:36] 209824147 0 kriszrap 3
[21:18:36] 701603673 0 kriszrap 4
[21:18:36] 709314934 0 kriszrap 4
[21:18:36] 709135641 0 kriszrap 4
[21:18:36] 302918319 0 kriszrap 4
[21:18:36] 209824147 0 kriszrap 4
[21:18:36] 701603673 0 kriszrap 5
[21:18:36] 709314934 0 kriszrap 5
[21:18:36] 709135641 0 kriszrap 5
[21:18:36] 302918319 0 kriszrap 5
[21:18:36] 209824147 0 kriszrap 5
[21:18:36] 701603673 0 kriszrap 6
[21:18:36] 709314934 0 kriszrap 6
[21:18:36] 709135641 0 kriszrap 6
[21:18:36] 302918319 0 kriszrap 6
[21:18:36] 209824147 0 kriszrap 6
[21:18:36] 701603673 0 kriszrap 7
[21:18:36] 709314934 0 kriszrap 7
[21:18:36] 709135641 0 kriszrap 7
[21:18:36] 302918319 0 kriszrap 7
[21:18:36] 209824147 0 kriszrap 7
ötlet?