Custom code After Save

Custom code After Save

Unread postby sultan87 » Mon Nov 07, 2016 8:28 pm

the code in after-save is not performed
Code: Select all
nuDebug("Après Sauvegarde Séjours Locataires");

// Recherche id_locataire dans table suivi

nuDebug("Recherche Numéro Locataires");

$s = "

SELECT s_id_locataire
FROM suivi
WHERE id_suivi = '1'


$t = nuRunQuery($s);
$r = db_fetch_row($t);
$p = $r[0];

// MAJ id_locataire dans table sejours

$s = "

UPDATE sejours
SET id_locataire_sejour =  '$p'
WHERE id_sejours = '#RECORD_ID#'


why ?
Best regards
Posts: 32
Joined: Thu Jun 11, 2015 5:58 am

Re: Custom code After Save

Unread postby admin » Mon Nov 14, 2016 7:01 am


I don't understand your question.

Site Admin
Posts: 3426
Joined: Mon Jun 15, 2009 9:53 am
nuBuilder Version: 4.5

Re: Custom code After Save

Unread postby mobilemcclintic » Thu Nov 17, 2016 2:37 pm

I think you need to tell nubuilder what to do.

Just reading the last bit,you set $s, but don't do anything with it.
Add nuRunQuery($s); to the end. If everything else is right, it should perform your update.
Posts: 54
Joined: Fri Oct 23, 2015 8:04 am

Return to Custom Code

Who is online

Users browsing this forum: No registered users and 1 guest