new entry problem

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
Mahmud
Posts: 12
Joined: 2017-03-12 08:53

new entry problem

Post by Mahmud » 2021-10-24 10:04

Field 'STATUS' doesn't have a default value ???

what can i do

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: new entry problem

Post by pbottcher » 2021-10-24 14:43

Hi,

probably you have set your field to be not null, but not definied a default value. Check within the field definition for that field and set the default value to your needs.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Mahmud
Posts: 12
Joined: 2017-03-12 08:53

Re: new entry problem

Post by Mahmud » 2021-10-26 03:43

<?php
// For help on using hooks, please refer to https://bigprof.com/appgini/help/workin ... tion/hooks

function G_R_N_USER_DATA_15_init(&$options, $memberInfo, &$args){
/* Inserted by Search Page Maker for AppGini on 2020-06-13 11:49:22 */
$options->FilterPage = 'hooks/G_R_N_USER_DATA_15_filter.php';


return TRUE;
}

function G_R_N_USER_DATA_15_header($contentType, $memberInfo, &$args){
$header='';

switch($contentType){
case 'tableview':
$header='';
break;

case 'detailview':
$header='';
break;

case 'tableview+detailview':
$header='';
break;

case 'print-tableview':
$header='';
break;

case 'print-detailview':
$header='';
break;

case 'filters':
$header='';
break;
}

return $header;
}

function G_R_N_USER_DATA_15_footer($contentType, $memberInfo, &$args){
$footer='';

switch($contentType){
case 'tableview':
$footer='';
break;

case 'detailview':
$footer='';
break;

case 'tableview+detailview':
$footer='';
break;

case 'print-tableview':
$footer='';
break;

case 'print-detailview':
$footer='';
break;

case 'filters':
$footer='';
break;
}

return $footer;
}

function G_R_N_USER_DATA_15_before_insert(&$data, $memberInfo, &$args){

return TRUE;
}

function G_R_N_USER_DATA_15_after_insert($data, $memberInfo, &$args){

$id = $data['id'];
$DATE = $data['DATE'];
$PROJECT_NAME = $data['PROJECT_NAME'];
$PRODUCT_NAME = $data['PRODUCT_NAME'];
$SUPPLIER = $data['SUPPLIER'];
$UNIT = $data['UNIT'];
$NOTE = $data['NOTE'];
$QUANTITY = $data['QUANTITY'];
$ATTACHMENT = $data['ATTACHMENT'];



$con = mysqli_connect('localhost', 'hasan_cons', 'admin04227', 'hasan_cons');


mysqli_query($con, "INSERT INTO G_R_N (DATE, PROJECT_NAME, PRODUCT_NAME, SUPPLIER, UNIT, NOTE, QUANTITY, ATTACHMENT) VALUES ('$DATE', '$PROJECT_NAME', '$PRODUCT_NAME', '$SUPPLIER', '$UNIT', '$NOTE', '$QUANTITY', '$ATTACHMENT')") or die(mysqli_error($con));
mysqli_query($con, "INSERT INTO INVENTORY_15 (DATE, PROJECT_NAME, PRODUCT_NAME, SUPPLIER, UNIT, NOTE, QUANTITY, ATTACHMENT) VALUES ('$DATE', '$PROJECT_NAME', '$PRODUCT_NAME', '$SUPPLIER', '$UNIT', '$NOTE', '$QUANTITY', '$ATTACHMENT')") or die(mysqli_error($con));



return TRUE;
}

function G_R_N_USER_DATA_15_before_update(&$data, $memberInfo, &$args){

return TRUE;
}

function G_R_N_USER_DATA_15_after_update($data, $memberInfo, &$args){

return TRUE;
}

function G_R_N_USER_DATA_15_before_delete($selectedID, &$skipChecks, $memberInfo, &$args){

return TRUE;
}

function G_R_N_USER_DATA_15_after_delete($selectedID, $memberInfo, &$args){

}

function G_R_N_USER_DATA_15_dv($selectedID, $memberInfo, &$html, &$args){

}

function G_R_N_USER_DATA_15_csv($query, $memberInfo, &$args){

return $query;
}
function G_R_N_USER_DATA_15_batch_actions(&$args){

return array();
}

Mahmud
Posts: 12
Joined: 2017-03-12 08:53

Re: new entry problem

Post by Mahmud » 2021-10-26 04:22

G R N USER DATA JU
id INT unsigned not null primary key auto_increment INT(10) unsigned not null primary key auto_increment
DATE DATE null DATE
PROJECT_NAME VARCHAR(40) not null VARCHAR(40) not null
PRODUCT_NAME INT unsigned not null INT(10) unsigned not null
SUPPLIER INT unsigned not null INT(10) unsigned not null
UNIT VARCHAR(40) null VARCHAR(40)
NOTE VARCHAR(40) null VARCHAR(40)
QUANTITY DECIMAL(10,2) not null DECIMAL(10,2) not null
ATTACHMENT VARCHAR(40) null VARCHAR(40)

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: new entry problem

Post by pbottcher » 2021-10-26 17:59

hmm, no information, no help possible.....

There is no status field.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply