Minggu, 06 Oktober 2013

PHP Indonesia - Facebook: maaf OOT code nya gini UPDATE emails SET `email_at...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Fun with Brazilian Portuguese

Learn the tips and tricks to speak colloquial Portuguese in a natural and confident manner. Enroll today for just $69!
From our sponsors
maaf OOT code nya gini UPDATE emails SET `email_at...
Oct 7th 2013, 02:48, by Irul Nuno

Irul Nuno 2:48am Oct 7
maaf OOT
code nya gini
UPDATE emails SET `email_attachment` = ? WHERE `email_id` = ?
errornya gini
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? WHERE `email_id` = ?' at line 1
kira kira kenapa ya errornya ?

Cahya Sulianto 2:52am Oct 7
klo blh tau, arti dari tanda tanya (?) itu apa gan

Irul Nuno 2:53am Oct 7
tidak diketahui

Ahmad Teguh Satria 2:55am Oct 7
tanda tanyanya fungsinya buat apa?

Theo Fileo Pradipta 2:58am Oct 7
//ini contoh file yang diambil $id = $_POST['id']; $email = $_POST['email']; UPDATE emails SET 'email_attachment'='$email' WHERE 'email_id' = '$id'; Yang tanda "?" nya ane ganti om, jd hanya bayangan saja, Untuk $id dan$email ente sesuaikan aja om. Selain itu coba ente perhatikan tanda ' (kutip) nya. Sama2 newbie gan :D

Dicky Agustin C'ociv Thea 3:04am Oct 7
UPDATE emails SET email_attachment = '?' WHERE email_id = '?'

field nya gak usah diberi tanda kutip, value ny saja yg diberi.
Moga bermanfaat

Irul Nuno 3:07am Oct 7
Theo Fileo Pradipta malah indefined index email_id gan

Askinas Kurniawan 3:10am Oct 7
Errornya karena tanda ?

Theo Fileo Pradipta 3:10am Oct 7
itu tanda ? nya maksudnya apa gan? itu kan hanya cth saja yang $email nya gan. coba kirim skrip lengkapnya om

Theo Fileo Pradipta 3:14am Oct 7
menurut pengalaman saya tanda (kutip) ` dan ' sangat berpengaruh, jadi perhatikan tanda kutip nya juga om. menurut saya sih.

Irul Nuno 3:18am Oct 7
Dicky Agustin C'ociv Thea : kalo itu di navicat bisa gan , tapi di program nya errornya gini :Unknown column '' in 'where clause'

Irul Nuno 3:19am Oct 7
Theo Fileo Pradipta
tolong bantuin gan
<?php

if (!defined('BASEPATH'))
exit('No direct script access allowed');
// load base class if needed
require_once( APPPATH . 'controllers/base/AdminBase.php' );

// --

class compose extends ApplicationBase {

// constructor
public function __construct() {
parent::__construct();
// load model
$this->load->model("m_compose");
$this->load->library('tnotification');
}

public function index() {
// load template
$this->smarty->assign("template_content", "latihan/compose/compose_tampilan.html");
// get data
$params = array($this->com_user['user_id']);
$rs_contacts = $this->m_compose->get_all_contacts($params);
//assign var
$this->smarty->assign("rs_contacts", $rs_contacts);
// $filepath = base_url() . 'resource/doc/file/default.doc';
// if (!empty($result['email_attachment'])) {
// $filepath_database = 'resource/doc/file/' . $result['email_attachment'];
// if (is_file($filepath_database)) {
// $filepath = base_url() . 'resource/doc/file/' . $result['email_attachment'];
// }
// }
// $result['email_attachment'] = $filepath;
// assign
//$this->smarty->assign("result", $result);
// notification
$this->tnotification->display_notification();
$this->tnotification->display_last_field();
// display
parent::display();
}

// Email Send
public function email_send() {
// cek input
$this->tnotification->set_rules('email_to', 'Kepada', 'required');
$this->tnotification->set_rules('email_subject', 'Subyek', 'trim|required|max_length[100]');
$this->tnotification->set_rules('email_content', 'Message', 'trim|required|max_length[5000]');
// process
if ($this->tnotification->run() !== FALSE) {
$params = array($this->input->post('email_subject'), $this->com_user['user_mail'],
$this->input->post('email_to'), $this->input->post('email_content'));
// insert
if ($this->m_compose->send_email($params)) {
$this->load->library('tupload');
// upload config
$config['upload_path'] = 'resource/doc/file/';
$config['allowed_types'] = 'doc|docx';
$config['max_size'] = '2048';
$config['overwrite'] = TRUE;
// $config['file_name'] = $this->m_compose->get_last_data_by_id(`$email_id`);
$this->tupload->initialize($config);
// execute upload
$this->tupload->do_upload('email_attachment');
// update gambar
$params = array($this->tupload->file_name);
$this->m_compose->insert_file($params);
//get last id

// notifikasi
$this->tnotification->delete_last_field();
$this->tnotification->sent_notification("success", "Data berhasil disimpan");
} else {
// default error
$this->tnotification->sent_notification("error", "Data gagal disimpan");
}
} else {
// default error
$this->tnotification->sent_notification("error", "Data gagal disimpan");
}
redirect("latihan/compose");
}

}

Pika Chaw 3:21am Oct 7
kayanya mo nyobain pdo ya? ada binding2 gitu. kl iya, cb ubek2 deh ttg bindparam, bindvalue

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar