Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,070 members, 7,818,195 topics. Date: Sunday, 05 May 2024 at 10:00 AM

Help! Sqlite Database Not Updating After Using Bind_param - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Help! Sqlite Database Not Updating After Using Bind_param (621 Views)

PHP: Updating Record Within A While Loop / Help In Updating And Upgrading Debian Gnu/linux 7.0_kali_ / Anybody Here Know How One Can Password/encrypt Sqlite Database in C++? (2) (3) (4)

(1) (Reply)

Help! Sqlite Database Not Updating After Using Bind_param by uvalued(m): 7:07pm On Jun 30, 2015
$stmt = $dbh->prepare("
UPDATE entry SET
voms=:voms,
counter=:counter,
session=:session,
principal=:principal
WHERE formno=:formno " );

$stmt->bindparam(':voms', $voms);
$stmt->bindparam(':counter', $counters);
$stmt->bindparam(':session', $sessn);
$stmt->bindparam(':principal', $voms);
$stmt->bindparam(':formno', $idvalue);
$stmt->execute();



After been adviced to switched to PDO/MYSQLI, i settled for PDO because of its flexibility over various database engine. However, looking at the above, i have been scratching my head since morning to get it to work effectively with little success.

My problem is that it shows its updating the sqlite database but on checking the database, it does not update the database.

Please am i missing anything in the code above, what am i doing wrong. Thanks for your guidance
Re: Help! Sqlite Database Not Updating After Using Bind_param by Nobody: 7:29pm On Jun 30, 2015
turn on pdo 's error exception
http://php.net/manual/en/pdo.setattribute.php
Re: Help! Sqlite Database Not Updating After Using Bind_param by uvalued(m): 9:12pm On Jun 30, 2015
thanks jregs

i was not updating based on id but on the form hence the continous problem.

resolved it

(1) (Reply)

How To Apply Adclx To Blog / Is Computer Science Masters Degree In Canada Advisable / Hackers In The House. What Is The Biggest Hack You've Ever Pulled Off

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.