Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Mon Aug 25, 2014 1:23 am
Hi,
I'm trying to use the below code to auto increment a field. I added the hash variables for nuBuilderPro but it does not work.
Code: Select all
if('#nu_cloned_record#' == '1' or '#RECORD_ID#' == '-1'){ //-- this is a new record
nuRunQuery("INSERT INTO recepcounter (extra_field) VALUES ('1')");
$s = "UPDATE reception SET reception_code = '" . mysql_insert_id() . "' ";
$s .= "WHERE reception_id = '#nu_new_record#'";
nuRunQuery($s);
}
Could you please advise?
BR
Rui
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Wed Aug 27, 2014 11:54 pm
Hi Steven,
Thank you!
How can I use "#invoice_number#" inside "PHP Code"?
BR
Rui
ruiascensao
Posts: 177 Joined: Tue Nov 15, 2011 2:24 pm
Unread post
by ruiascensao » Thu Aug 28, 2014 3:40 pm
Hi Steven,
Thanks!
Sorry ... I'm just starting with nuBuilder3.
Great product.
Rui
BR
Rui
admin
Site Admin
Posts: 2815 Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times
Unread post
by admin » Mon Sep 01, 2014 1:28 am
Tell all your friends!