更新时间:2022-11-25 15:04:21
我现在通过使用mysqli
而不是mysql
找到了解决方案.
I now found solution by using mysqli
instead of mysql
.
<?php
// enable error reporting
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
//connect to database
$connection = mysqli_connect("hostname", "user", "password", "db", "port");
//run the store proc
$result = mysqli_query($connection, "CALL StoreProcName");
//loop the result set
while ($row = mysqli_fetch_array($result)){
echo $row[0] . " - " . + $row[1];
}
我发现许多人似乎在使用mysql_connect, mysql_query and mysql_fetch_array
时遇到问题.
I found that many people seem to have a problem with using mysql_connect, mysql_query and mysql_fetch_array
.