我是编程的新手,我正在寻找这个,但找不到答案。 这是我的PHP代码:
Vulkan_LIBRARY
所以,我需要的是基本上我想再次从这个变量中选择一些记录。 像,
VULKAN_INCLUDE_DIR
任何帮助都会受到极大的赞赏。
谢谢。
答案 0 :(得分:0)
嗯..要回答您的问题,您需要mysqli_fetch_assoc
将数据库row
转换为array
https://www.w3schools.com/php/func_mysqli_fetch_assoc.asp
所以,你可以试试这个:
$conn = mysqli_connect("127.0.0.1","root","","databasename");
$sql = "select values from table where condition1";
$query = mysqli_query($conn, $sql);
$result = mysqli_fetch_assoc($query);
然后,您的$result[column_name]
应该可用:
$set1 = mysqli_query($conn, "select values from $result[table_name] where $result[column_name] = 'value1'");
$result1 = mysqli_fetch_assoc($set1 );
$set2 = mysqli_query($conn, "select values from $result[table_name] where $result[column_name] = 'value2'");
$result2 = mysqli_fetch_assoc($set2 );
$set3 = mysqli_query($conn, "select values from $result[table_name] where $result[column_name] = 'value3'");
$result3 = mysqli_fetch_assoc($set3 );