Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //clase precios
- class price{
- $dbhost = "localhost";
- $dbuser = "siften_data";
- $dbpass = "data1234";
- Var $error;
- //login base de datos
- $mysqli = new mysqli($dbhost, $dbuser, $dbpass, "siften_database.db");
- Function Insert($ins){
- if (!empty($ins)){
- $mysqli-> query("INSERT INTO prices (name, price_unit, price_discount, amount_discount) VALUES ($name,$price, $discount, $amount)");
- }
- }
- Function edit($edi){
- if (!empty($edi)){
- $mysqli-> query("UPDATE user SET price_unit=$price, name=$name, price_discount=$discount, amount_discount=$amount WHERE id_price=$id");
- }
- }
- Function delete($del){
- if (!empty($ins)){
- $mysqli-> query("Delete from prices where id_price=$id");
- }
- }
- //fin clase
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement