mysql query result in php variable

前端 未结 5 1085
误落风尘
误落风尘 2020-11-30 07:56

Is there any way to store mysql result in php variable? thanks

$query = \"SELECT username,userid FROM user WHERE username = \'admin\' \";
$result=$conn->q         


        
5条回答
  •  猫巷女王i
    2020-11-30 08:37

    Of course there is. Check out mysql_query, and mysql_fetch_row if you use MySQL.
    Example from PHP manual:

    
    

提交回复
热议问题