Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- date_default_timezone_set('America/Tijuana');
- $year = date("y");
- $query = 'INSERT INTO inventory_list (folio,description_item,price_item,manufacturer,model_item,reorder_Level,target_Stock,image,registerDate,commentt,fkEngineer,fkCategory,fkLocation,fkSupplier,fkUnit,fkSubCat)
- VALUES (?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);';
- $result = $connection->executeNonQuery($query,array($year,$_POST['description_item'], $_POST['price_item'] ,
- $_POST['manufacturer'], $_POST['model_item'], $_POST['reorder_Level'], $_POST['target_Stock'], $_POST['imageName'],
- $hoy, $_POST['commentt'] ,$_POST['fkEngineer'],$_POST['fkCategory'],$_POST['fkLocation'],$_POST['fkSupplier'],$_POST['fkUnit'],$_POST['fkSubCat']));
- CREATE DEFINER=`root`@`%` PROCEDURE `Agregar_inventory_list`(
- in xfolio text,
- in xdescription_item text
- )
- BEGIN
- declare v_id int(11);
- insert into inventory_list(folio,description_item,anio) values(xfolio,xdescription_item,year(now()));
- select max(id) into v_id from inventory_list;
- update inventory_list set concatenado=concat(v_id,'-',year(now())) where id=v_id;
- END
Add Comment
Please, Sign In to add comment