Jump to content

php-pendejo

Members
  • Posts

    22
  • Joined

  • Last visited

About php-pendejo

  • Birthday 04/30/1977

Profile Information

  • Gender
    Male
  • Location
    Miami

php-pendejo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I guess no one knows what or how to help me. the script works on insert and connecting to the database and deleting and so on. the problem starts just when updating. my connection looks like this $DATABASE = array( "dsn" => "mysql:host=localhost;port=3306;dbname=database", "username" => "root", "password" => "password" ); so whoever wants to use this can do with it what they like enjoy
  2. Wow I have to say its been a long time since I posted here but I do need alittle help so here we go: I got this script or created most of it (I dont remember) for me to connect mysql using PDO. The script works fine exept when i try to update a column in my db. now i get no errors but it does not update. $superglobals = array($_POST); foreach ($superglobals as $value){ foreach ($value as $k => $v){ $post[$k]=$v; } } $sql = "UPDATE ".DB_PREFIX."_dbase SET value = :value WHERE key = :key"; foreach ($post as $key => $value) { $bind = array("value"=> $value, "key"=>$key); $db->execute($sql, $bind) or die($db->error()); } I have upload the db class and gave you what im trying to do please help Here is the database CREATE TABLE db_dbase ( key text, value text ) database.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.