Home >Database >Mysql Tutorial >数据库变量查询字符串转换_MySQL

数据库变量查询字符串转换_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:30:111340browse

bitsCN.com


数据库变量查询字符串转换

 

printf("输入货号单:");    char k[10];gets(k);   sprintf(sql_update, "select * from huodan where 货单号='%s'",k);     res=mysql_query(&myCont,sql_update);//查询 

 

 

这里是通过C语言将含有变量%s的变量保存在sql_update中。。。。

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:MySQL时间戳转换_MySQLNext article:MYSQL数据回流_MySQL