Warum wird nur von lID 1 geladen und nicht bis zum Ende durch ?
Code
format(string,sizeof(string),"SELECT * FROM jobgehalt");
mysql_function_query(sqlHandle,string,true, "Loadgehalter", "");
Code
forward Loadgehalter();
public Loadgehalter()
{
new rows = cache_get_row_count(), lID,lResult[256];
if(rows > 0)
{
cache_get_field_content(0, "ID", lResult), lID = strval(lResult);
if(lID == 1)
{
cache_get_field_content(0, "Rang1", lResult), MUELLMANNGEHATL_1 = floatstr(lResult);
printf("%f",MUELLMANNGEHATL_1);
cache_get_field_content(0, "Rang2", lResult), MUELLMANNGEHATL_2 = floatstr(lResult);
cache_get_field_content(0, "Rang3", lResult), MUELLMANNGEHATL_3 = floatstr(lResult);
cache_get_field_content(0, "Rang4", lResult), MUELLMANNGEHATL_4 = floatstr(lResult);
cache_get_field_content(0, "Rang5", lResult), MUELLMANNGEHATL_5 = floatstr(lResult);
}
if(lID == 2)
{
cache_get_field_content(0, "Rang1", lResult), STADTREINIGERGEHALT_1 = floatstr(lResult);
cache_get_field_content(0, "Rang2", lResult), STADTREINIGERGEHALT_2 = floatstr(lResult);
cache_get_field_content(0, "Rang3", lResult), STADTREINIGERGEHALT_3 = floatstr(lResult);
cache_get_field_content(0, "Rang4", lResult), STADTREINIGERGEHALT_4 = floatstr(lResult);
cache_get_field_content(0, "Rang5", lResult), STADTREINIGERGEHALT_5 = floatstr(lResult);
}
if(lID == 3)
{
cache_get_field_content(0, "Rang1", lResult), FARMERGEHALT_1 = floatstr(lResult);
cache_get_field_content(0, "Rang2", lResult), FARMERGEHALT_2 = floatstr(lResult);
cache_get_field_content(0, "Rang3", lResult), FARMERGEHALT_3 = floatstr(lResult);
cache_get_field_content(0, "Rang4", lResult), FARMERGEHALT_4 = floatstr(lResult);
cache_get_field_content(0, "Rang5", lResult), FARMERGEHALT_5 = floatstr(lResult);
}
if(lID == 4)
{
cache_get_field_content(0, "Rang1", lResult), ERZPREIS_1 = floatstr(lResult);
printf("%f",ERZPREIS_1);
cache_get_field_content(0, "Rang2", lResult), ERZPREIS_2 = floatstr(lResult);
cache_get_field_content(0, "Rang3", lResult), ERZPREIS_3 = floatstr(lResult);
cache_get_field_content(0, "Rang4", lResult), ERZPREIS_4 = floatstr(lResult);
cache_get_field_content(0, "Rang5", lResult), ERZPREIS_5 = floatstr(lResult);
}
if(lID == 5)
{
cache_get_field_content(0, "Rang1", lResult), HUNTINGPREIS_1 = floatstr(lResult);
cache_get_field_content(0, "Rang2", lResult), HUNTINGPREIS_2 = floatstr(lResult);
cache_get_field_content(0, "Rang3", lResult), HUNTINGPREIS_3 = floatstr(lResult);
cache_get_field_content(0, "Rang4", lResult), HUNTINGPREIS_4 = floatstr(lResult);
cache_get_field_content(0, "Rang5", lResult), HUNTINGPREIS_5 = floatstr(lResult);
}
if(lID == 6)
{
cache_get_field_content(0, "Rang1", lResult), ERZTRUCK = strval(lResult);
}
}
return 1;
}
Alles anzeigen