hello i have this code:

    $event_id = $_POST['event_id'];
    $euser_id = $_POST['euser_id'];

    $getpic = $dbh->prepare("SELECT chair_id,chair_image,ext,posx,posy FROM cinema WHERE cuser_id = ? AND event_id = ?");
    $getpic->bindParam(1, $euser_id, PDO::PARAM_INT);
    $getpic->bindParam(2, $event_id, PDO::PARAM_INT);
    $getpic->exectue();

but im getting error:

Fatal error: Call to undefined method PDOStatement::exectue() in.... on line 10; line 10 being $getpic->execute();

i have tried it in the mysql search query box with specific values of cuser_id and event_id and the results are displayed. i checked the console in the headers tab and under Form Data event_id and euser_id is correct but error occurs. please help.

Recommended Answers

All 2 Replies

Hello, it's execute, not exectue , so change line 7 to:

$getpic->execute();

oh crap. typo. thanks cereal

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.