add price
This commit is contained in:
33
app/routes/price.php
Normal file
33
app/routes/price.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
|
||||
function priceid_kuri($id){
|
||||
|
||||
$price = db_get("SELECT `pricename` FROM price WHERE `price_id` = $id");
|
||||
|
||||
if (is_array($price))
|
||||
return $price;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function addhash_kuri(){
|
||||
|
||||
$ssql = "SELECT `price_id`, `BeginDate` FROM `price` WHERE `pricehash` = '' LIMIT 10";
|
||||
$items = dbl_get($ssql);
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
||||
$id = $item['price_id'];
|
||||
$date = $item['BeginDate'];
|
||||
|
||||
$hash = md5("$id$date");
|
||||
$usql = "UPDATE `price` SET `pricehash` = '$hash' WHERE `price_id` = '$id'";
|
||||
|
||||
dbl_get($usql, 'reader');
|
||||
|
||||
echo $usql."\n";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user