select and echo a single field from mysql db using PHP

前端 未结 4 783
一生所求
一生所求 2021-02-02 16:46

Im trying to select the title column from a particular row

$eventid = $_GET[\'id\'];
$field = $_GET[\'field\'];
$result = mysql_query(\"SELECT $field FROM `event         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-02 17:12

    And escape your values with mysql_real_escape_string since PHP6 won't do that for you anymore! :)

提交回复
热议问题