how to do an insert of an input adding the value to the column of the database? Mysql + php

-1

I am a beginner in php and I am doing a project for tcc of my technical course where, I have to register for an employee. how do I, when doing the insert add the value with what is already registered in the bank?

    
asked by anonymous 18.11.2018 / 17:22

1 answer

0

$ sql = new Sql (); $ sql-> SELECT ("UPDATE table SET 'table fields without quotes' = bindvalue of table plus value to be incremented");

I do not know if it was very clear. Try to send us more examples.

  • ); $ sql-> bindParam (': name', $ name, PDO :: PARAM_STR); $ sql-> bindParam (': dt', $ dt, PDO :: PARAM_STR); $ sql-> bindParam (': hours', $ hours, PDO :: PARAM_STR); $ sql-> execute ();

    I think you'd better try to do via procedure, because otherwise you'll have to build extensive methods and codes as I see it. In the procedure you put to return the time with increment of a variable, can be another column in the table for that.

        
  • 18.11.2018 / 18:12