Announcement

Collapse
No announcement yet.

Why this code does not work?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why this code does not work?

    Code:
    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"

  • #2
    Re: Why this code does not work?

    The first SQLworks fine, it returns a valid idmalla

    Comment


    • #3
      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

      Comment


      • #4
        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_u...p?topic=3994.0

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

        Debug your code until you find the culprit.

        Regards,
        Scott.

        Comment


        • #5
          Re: Why this code does not work?

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

          Comment

          Working...
          X