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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:30:11
Original
1341 people have browsed it

bitsCN.com


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

 

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

 

 

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

bitsCN.com
Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template