I have a control application with some fields. Ofcourse the control app has two buttons, ‘ok’ & ‘exit’.
I presume that when i press the ‘ok’ button, the onvalidate event is fired.
The first time i pressed it, it worked. The code is run. Now when i run it, it doesnt work. i have inserted sc_alert() messages to show code execution but nothing happens.
Any ideas?
here is the code:
sc_alert(“about to …”);
$DateFrom = {DateFrom};
$DateTo = {DateTo};
$ClassID = {ClassID};
$To = {To};
$From = {From};
sc_alert($DateFrom.$DateTo.$To.$From );
// sql statement to retrive data from students
$check_sql = “SELECT
StudentsID”
. " FROM Students"
. " WHERE StudentsID >= " . {From}
. " AND StudentsID <= " .{To};
// execute the sql
sc_lookup(rs, $check_sql);
if (!empty({rs})) // some resutles where returned
{
$datasetCount = count({rs}); // returns count of array items of any array
sc_alert(“Number of Results Returned: '”.$datasetCount."");
/*for($i=0; $i <$datasetCount; $i++) // looping through rows of the array
{
}
*/
}
else
{
sc_alert(“No results where returned from the students stable!!”);
}