Google Search Within opentiss.uk

2009-09-05

幸福在继续:20090904

今天我爱人让我跟淘宝店的顾客联系,请求顾客的谅解,如果有可能,我们给予其退货、退款,因为顾客需要大一号的童装,而我们最大号的也比他的需要小一号,真是很让人烦心的事情呀,爱人是对的,经商就是要靠诚信的,尤其是网店。一大早我奉命起来值班,准备跟顾客说明情况,但顾客却非常平静,竟然一直没有上线,爱人最后决定,发短消息告知其具体情况,但令人惊讶的是短消息也无回音,最后只好打电话直接解释。真是功夫不负有心人,顾客说他家孩子穿这一号的今年刚刚好,只是想让孩子能多穿一年,所以才想买个大一号的,可以接受我们所提供的商品,当然此消息非常令人振奋,我们就赶快准备发货,向申通快递下单。刚过了一会,淘宝旺旺竟然突然来了一条商品已经卖出的通知,我们赶快查看,发现果然又有一商品卖出了,真是幸福来敲门,让人很振奋呀。最终我们成功在这一周做成了两单生意,虽然业绩不怎么令人满意,但毕竟是一个良好的开端,明天会更好。今天的美中不足是我们跟申通采用的是现金结算,快递费高了些,如果以后能月结的话,费用会便宜些,努力、加油,就会有所收获。
今天我还在继续学习PHP与MySQL应用开发的相关知识,今天想用PHP跟MySQL数据库交互,看了Mambo及Mediawiki的相关源代码,感觉都是直接用SQL语句进行数据操作,因为数年前,我在速达上海分公司做产品时大量采用了存储过程,所以也就想应用一下MySQL的存储过程,经过查看MySQL及PHP相关文档,我用mysqli及mysqli_stmt_bind_param进行了验证,以下是MySQL创建数据库及生成表与存储过程的命令:
create database `openshop` default character set utf8 collate utf8_general_ci;
GRANT ALL PRIVILEGES ON openshop.* TO 'os'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

use openshop;
CREATE TABLE /*_*/users (
  user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,

  user_name varchar(255) binary NOT NULL default ''
);

delimiter //
CREATE PROCEDURE insert_user(IN name varchar(255))
BEGIN
insert into users(user_name) values(name);
END
//
然后使用了以下PHP验证代码:
<?php
$mysqli = new mysqli("localhost", "os", "password", "openshop");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

$city = "hah'a";

/* create a prepared statement */
if ($stmt = $mysqli->prepare("call insert_user(?)")) {
    
    /* bind parameters for markers */
    $stmt->bind_param("s", $city);

    /* execute query */
    $stmt->execute();

    /* close statement */
    $stmt->close();
    echo $city;
}

/* close connection */
$mysqli->close();
?>
通过MySQL客户端查询结果如下图所示:

其实这么做大家也知道,只有一个好处,那就是可以避免使用PHP生成表插入数据时对特殊字符“'”的处理。今天真是一切顺利,明天继续。

6 条评论:

匿名 说...

ugg sale
ugg uk
ugg boots sale
ugg boots outlet store
uggs sale
north face outlet
isabel marant sneakers
discount ugg boots
uggs outlet online
ugg boots uk
fendi bags
cheap ugg boots
ugg boots sale
tiffany and co jewelry
balenciaga outlet
uggs on sale uk
nike high heels
longchamp outlet store
discount ugg boots
cheap kevin durant shoes
ugg sale
ugg boots on sale
uggs black friday
parajumper outlet
uggs outlet
ugg boots sale
ugg boots for cheap
uggs clearance
discount uggs
cheap ugg boots
ugg boots for kids
ugg boots sale uk
ugg boots outlet
ugg uk
ugg boots uk

匿名 说...


Air Jordans Shoes
Air Jordan Pas Cher
Air Jordan Retro Shoes
Air Jordan Femme
Nike Air Jordan
Nike Free Shoes
Cheap Beats Headphones
Kyrie Irving Shoes
New KD 7
Kobe 9 Shoes
lebron 12
cheap kd 7
Air Jordan Retro Shoes
CHEAP KOBE 9
Jordan Pas Cher
Beats By Dre For Sale
KD 7 Shoes
kobe 9 christmas
lbj shoes
Kobe 9 Elite
Kobe 9 Low
kobe 9 elite pas cher
Zapatillas Air Jordan
Casque Beats Pas Cher

柯云 说...

2016-05-07keyun
ralph lauren home
ray ban eyeglasses
hollister clothing store
coach outlet clearance
louis vuitton outlet online
ghd hair straighteners
concords 11
coach outlet store
instyler
louis vuitton handbags
ray ban sunglasses wholesale
ray ban sunglasses
reb christian louboutin
air jordan shoes
adidas originals store
louis vuitton bags
coach outlet
ray bans
air max 95
louboutin shoes
coach outlet
ray ban sunglasses
polo ralph lauren
christian louboutin outlet
coach factory outlet online
christian louboutin shoes
hollister shirts
kd 8
michael kors handbags
kobe 8
ray ban outlet
louis vuitton handbags
michael kors bags
air jordan homme
louis vuitton outlet online
hollister clothing
fitflop shoes
cheap ray ban sunglasses
michael kors outlet online

Unknown 说...

ray ban sunglasses
giuseppe zanotti
abercrombie and fitch
ugg boots
coach factory outlet
uggs on sale
uggs outlet
ugg boots
canada goose outlet
gucci outlet online
201612.15wengdongdong

chenmeinv0 说...

polo ralph lauren outlet
cheap pandora jewelry
instyler max
ralph lauren outlet
tory burch outlet
michael kors outlet online
nike roshe run
michael kors bags
adidas nmd
nike outlet
2017.3.13xukaimin

xumeiqing 说...

houston rockets jerseys
polo ralph lauren outlet online
louis vuitton
cheap oakley sunglasses
burberry outlet online
coach outlet
ed hardy sale
new york yankees jerseys
louboutin uk
adidas nmd
20170315huazhen