Home >Backend Development >PHP Tutorial > PHP怎么按照指定信息查找另一数据库中同一行的信息

PHP怎么按照指定信息查找另一数据库中同一行的信息

WBOY
WBOYOriginal
2016-06-13 12:41:441025browse

PHP如何按照指定信息查找另一数据库中同一行的信息。
已建好数据库tb_xmpc,只有两列,一列是xmpc_id,一列是xmpc_expr,现在我想按照从网页中提取到的xmpc_id信息得到对应的xmpc_expr列信息,设置为默认选项,不知为何总是无法显示出查询结果,向各路大侠请教!

相应代码如下:
//查找相应批次id所对应的批次说明
$query2=mssql_query("select * from tb_xmpc where xm_pcid='$xmpc_id'");
$myrow2=mssql_fetch_array($query2);
$old_pc=$myrow2[xmpc_expr];
?>

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