致命错误:调用未定义的方法PDOStatement :: bind_param()

时间:2016-09-14 08:49:48

标签: php mysql pdo

if ($stmt = $conn->prepare("SELECT webname, description,weburl,image FROM work where id=:action")) {



    // Bind a variable to the parameter as a string. 
    $stmt->bind_param(':action', $action);

    // Execute the statement.
    $stmt->execute();

    // Get the variables from the query.
    $stmt->bind_result($row);

    // Fetch the data.
    $stmt->fetch();



    // Close the prepared statement.
    $stmt->close();

0 个答案:

没有答案