Jump to content

Sky_Sailor

New Members
  • Posts

    8
  • Joined

  • Last visited

Sky_Sailor's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. honestly, i really want to explain here.. but my english not really good. how if i post all files project here??
  2. i have try that, but still didn't work.. ;'(
  3. i really didn't know what to do. i'm very confuse right now..
  4. on model page : public function create($abc){ $insert = $this->db->prepare('INSERT INTO member_data (`member_id`,`username`,`name`, `password`,`address`,`phone`,`nik_numb`,`gender`,`role`) VALUES(:member_id, :username, :name, :password, :address, :phone, :nik_numb, :gender, :role) '); $insert->execute(array( $id = $this->db->lastInsertId(); ':member_id' => $abc['member_id'], ':username' => $abc['username'], ':name' => $abc['name'], ':password' => $abc['password'], ':address' => $abc['address'], ':phone' => $abc['phone'], ':nik_numb' => $abc['nik_numb'], ':gender' => $abc['gender'], ':role' => $abc['role'] )); ........ and controllers page : $abc['member_id'] = 0 . date('ymdN') . '00' . $id; but i still don't get last insert id... please correct what is wrong..
  5. hey anybody.. anyone can help me?
  6. yes, i have read all of that, but i still can't understand. i need people to teach me. is that why i'm joining here.. i hope you can help me to learn php here.. thx a lot
  7. ok, i wil try your code. thx very much.
  8. hey developers, i have problem to get last insert id. btw.. i try to put that code on my mvc creation. on register_model page i write like this: public function numbering(){ $sth = $this->db->prepare('SELECT * FROM member_data'); $result = $this->db->lastInsertId(); return $result; } and for the controllers page, i write the code like this: $c = $this->model->numbering(); foreach ($c as $key => $value) { $data = $result('id'); } $abc['member_id'] = $data; but i didn't get the results,.. can you help me?
×
×
  • 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.