Hi all,
hope you’r doing well… i need some advice about something i’m trying to do with scriptcase. I have a search form that calls a single row form. Search criteria is set to only “equal to” and if the input is not complete it doesnt call any row from the db. Ex: search by phone no. user should enter the complete no. not just 2-3 digits. Now what i want, when the input is not complete, is to show a error message… not go to the form!
I tried something with the redirect macro:
** $check_table = ‘xts_cards’; // Table name
$check_where = “xts_cards.CARD_NO = ‘{CARD_NO}’”; // Where clause
// Check for record
$check_sql = 'SELECT *'
. ' FROM ' . $check_table
. ' WHERE ' . $check_where;
sc_select(dataset, $check_sql);
if (false == {dataset})
{
sc_redir('search_cards', "", "_self"); // Error while accessing database
}else
{
// Record found
}; **
… but no luck…
Does anyone have an idea what should i do?!?
Thanks a lot!!!