Google Search Within opentiss.net

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生成表插入数据时对特殊字符“'”的处理。今天真是一切顺利,明天继续。

11 条评论:

匿名 说...

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

ninest123 Ninest 说...

ninest123 12.23
nike free pas cher, hogan outlet, nike trainers, north face, hollister, mulberry, vans pas cher, air jordan, nike blazer, vanessa bruno, louboutin, nike air force, polo lacoste, air max, timberland, abercrombie and fitch, true religion jeans, michael kors outlet, sac longchamp pas cher, polo ralph lauren, longchamp, true religion jeans, nike tn, lululemon outlet online, nike roshe run pas cher, michael kors pas cher, oakley pas cher, nike free, michael kors uk, air max pas cher, true religion outlet, sac hermes, ray ban sunglasses, hollister, ralph lauren, ray ban pas cher, coach purses, michael kors, true religion outlet, air max, nike roshe, new balance pas cher, north face, sac guess, sac burberry, coach outlet store online, converse pas cher, replica handbags, nike air max, nike huaraches

ninest123 Ninest 说...

louis vuitton, air max, ray ban sunglasses, oakley sunglasses, burberry outlet, uggs, cheap uggs, michael kors outlet, christian louboutin, tiffany and co, prada outlet, louis vuitton outlet stores, ray ban sunglasses, cheap oakley sunglasses, longchamp handbags, uggs outlet, tiffany and co, nike shoes, tory burch outlet, ray ban sunglasses, longchamp handbags, oakley sunglasses, polo ralph lauren outlet, michael kors outlet, michael kors outlet online sale, chanel handbags, michael kors outlet, louis vuitton handbags, air max, louboutin outlet, burberry outlet, oakley sunglasses cheap, ugg outlet, louboutin, michael kors outlet, prada handbags, louis vuitton outlet, polo ralph lauren, nike free, replica watches, ugg boots clearance, michael kors outlet, louboutin shoes, jordan shoes, rolex watches, oakley sunglasses, louis vuitton outlet, gucci outlet, longchamp outlet

ninest123 Ninest 说...

converse, mcm handbags, reebok outlet, bottega veneta, p90x, chi flat iron, hollister clothing store, ray ban, jimmy choo outlet, lululemon outlet, nfl jerseys, iphone 6s cases, soccer jerseys, wedding dresses, louboutin, babyliss pro, beats by dre, north face outlet, ferragamo shoes, gucci, abercrombie, instyler, iphone 6s plus cases, asics running shoes, celine handbags, abercrombie and fitch, iphone 5s cases, ghd, vans, valentino shoes, air max, oakley, ipad cases, giuseppe zanotti, new balance shoes, herve leger, timberland boots, air max, baseball bats, iphone 6 cases, birkin bag, s6 case, ralph lauren, nike roshe run, north face jackets, insanity workout, iphone cases, mont blanc, iphone 6 plus cases, vans shoes, soccer shoes, mac cosmetics

ninest123 Ninest 说...

wedding dresses, moncler, ugg, louis vuitton, ugg, moncler, canada goose jackets, canada goose uk, supra shoes, pandora jewelry, swarovski, ugg pas cher, sac louis vuitton, swarovski crystal, canada goose, barbour, ugg, converse shoes, toms shoes, louis vuitton uk, sac louis vuitton, sac lancel, links of london, juicy couture outlet, canada goose, rolex watches, hollister, pandora jewelry, canada goose, thomas sabo, canada goose outlet, moncler, moncler, barbour, pandora charms, montre homme, doke gabbana, louis vuitton, canada goose, ugg boots, moncler outlet, moncler, pandora charms, moncler, juicy couture, karen millen, marc jacobs, moncler, canada goose, coach outlet store online
ninest123 12.23

柯云 说...

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

dong dong23 说...

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

Unknown 说...

broncos jerseys
longchamp bags
nike free 5
nike blazer pas cher
bengals jersey
michael kors handbags outlet
ralph lauren pas cher
longchamp le pliage
ecco shoes outlet
nike store uk

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