Of course there is. Check out mysql_query, and mysql_fetch_row if you use MySQL.Example from PHP manual:<?php$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");if (!$result) { echo 'Could not run query: ' . mysql_error(); exit;}$row = mysql_fetch_row($result);echo $row[0]; // 42echo $row[1]; // the email value?> 这篇关于MySQL查询结果在PHP变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!