Why this code does not work?

sc_lookup(idmalla, "select max(IDMALLA) from MALLACURRICULAR WHERE IDCARRERA = {descarrera}");
if ({idmalla[0][0]} === false)
{
   echo "Access error. Message =". {my_data_erro};
}
else
{   


	sc_lookup(fecha,"Select FECHAVIGENCIA from MALLACURRICULAR where IDMALLA = {idmalla[0][0]}");
	if ({fecha[0][0]} === false)
	{
   		echo "Access error. Message =". {my_data_erro};
	}
	else
    {
       /**
		 * Display a message after an AJAX call
		 */
		
		// Javascript message parameters
		$javascript_title  = 'PRUEBA';        // Javascript message title
		$javascript_message = "Entro".{fecha[0][0]}; //'This is a test message.'; // Javascript message contents
		
		// Display javascript message
		sc_ajax_message($javascript_message,$javascript_title); //{fecha[0][0]}
		{malladescri} = "Malla Curricular Asignada";//: N? {idmalla[0][0]} {fecha[0][0]}";
		
		
	}	
}

THe second SQL is a valid statement, it returns a date, but in this event the message just print “Entro”

Re: Why this code does not work?

The first SQLworks fine, it returns a valid idmalla

Re: Why this code does not work?

Ok, I work it out the sql problem using like this:

$sql = "Select FECHAVIGENCIA from MALLACURRICULAR where IDMALLA = ".{idmalla[0][0]};
sc_lookup(fecha,$sql);

Now this, don?t work for me, I want to put the result in a field to show in the form

{malladescri} = “N? " . {idmalla[0][0]}.” " . {fecha[0][0]}; //not working, prints nothing

Re: Why this code does not work?

What is empty, everything?

Are your values populated? Can you each each value to screen:
http://www.scriptcase.net/forum_en_us/index.php?topic=3994.0

Can your see any values without the "N? " in the string?

Debug your code until you find the culprit.

Regards,
Scott.

Re: Why this code does not work?

Hello Scott, I resolve my problem, it works fine now,thanks!