Home » Community » Newbie corner » Table is empty ?!
Table is empty ?! [message #41032] |
Tue, 22 October 2013 18:18  |
idkfa46
Messages: 155 Registered: December 2011
|
Experienced Member |
|
|
hi all,
I have to check if my database tables are empty...
I wrote this control function:
bool Impostazioni::ControlloDatabase()
{
int a,b;
SQL * Select(ID_TIPOLEGNO).From(TIPOLOGIALEGNO);
while(SQL.Fetch())
a = SQL[ID_TIPOLEGNO].GetCount();
SQL * Select(ID_LEGNO).From(CLASSIRESISTENZALEGNO);
while(SQL.Fetch())
b = SQL[ID_LEGNO].GetCount();
if(a>0 || b>0)
return true;
else
return false;
}
it works but... I don't like it, someone can explain me a better solution ?
regards,
Matteo
|
|
|
Goto Forum:
Current Time: Mon Apr 28 06:31:37 CEST 2025
Total time taken to generate the page: 0.00624 seconds
|