क्या कभी किसी ने इस त्रुटि के पार चलो गया है शामिल हैं: सामान्य त्रुटि: 1390 तैयार बयान भी कई प्लेसहोल्डरआयात देता सामान्य त्रुटि: 1390 तैयार बयान भी कई प्लेसहोल्डर
शामिल मैं सिर्फ का SequelPro के माध्यम से एक आयात किया 50,000 से अधिक रिकॉर्ड और अब जब मैं इन दृश्यों को अपने विचार में देखने के लिए जाता हूं (लैरावेल 4) मुझे सामान्य त्रुटि मिलती है: 13 9 0 तैयार कथन में बहुत से प्लेसहोल्डर हैं।
मेरी AdminNotesController.php फ़ाइल में नीचे दी गई अनुक्रमणिका() विधि क्वेरी उत्पन्न करने और दृश्य को प्रस्तुत करने वाला है।
public function index()
{
$created_at_value = Input::get('created_at_value');
$note_types_value = Input::get('note_types_value');
$contact_names_value = Input::get('contact_names_value');
$user_names_value = Input::get('user_names_value');
$account_managers_value = Input::get('account_managers_value');
if (is_null($created_at_value)) $created_at_value = DB::table('notes')->lists('created_at');
if (is_null($note_types_value)) $note_types_value = DB::table('note_types')->lists('type');
if (is_null($contact_names_value)) $contact_names_value = DB::table('contacts')->select(DB::raw('CONCAT(first_name," ",last_name) as cname'))->lists('cname');
if (is_null($user_names_value)) $user_names_value = DB::table('users')->select(DB::raw('CONCAT(first_name," ",last_name) as uname'))->lists('uname');
// In the view, there is a dropdown box, that allows the user to select the amount of records to show per page. Retrieve that value or set a default.
$perPage = Input::get('perPage', 10);
// This code retrieves the order from the session that has been selected by the user by clicking on a table column title. The value is placed in the session via the getOrder() method and is used later in the Eloquent query and joins.
$order = Session::get('account.order', 'company_name.asc');
$order = explode('.', $order);
$notes_query = Note::leftJoin('note_types', 'note_types.id', '=', 'notes.note_type_id')
->leftJoin('users', 'users.id', '=', 'notes.user_id')
->leftJoin('contacts', 'contacts.id', '=', 'notes.contact_id')
->orderBy($order[0], $order[1])
->select(array('notes.*', DB::raw('notes.id as nid')));
if (!empty($created_at_value)) $notes_query = $notes_query->whereIn('notes.created_at', $created_at_value);
$notes = $notes_query->whereIn('note_types.type', $note_types_value)
->whereIn(DB::raw('CONCAT(contacts.first_name," ",contacts.last_name)'), $contact_names_value)
->whereIn(DB::raw('CONCAT(users.first_name," ",users.last_name)'), $user_names_value)
->paginate($perPage)->appends(array('created_at_value' => Input::get('created_at_value'), 'note_types_value' => Input::get('note_types_value'), 'contact_names_value' => Input::get('contact_names_value'), 'user_names_value' => Input::get('user_names_value')));
$notes_trash = Note::onlyTrashed()
->leftJoin('note_types', 'note_types.id', '=', 'notes.note_type_id')
->leftJoin('users', 'users.id', '=', 'notes.user_id')
->leftJoin('contacts', 'contacts.id', '=', 'notes.contact_id')
->orderBy($order[0], $order[1])
->select(array('notes.*', DB::raw('notes.id as nid')))
->get();
$this->layout->content = View::make('admin.notes.index', array(
'notes' => $notes,
'created_at' => DB::table('notes')->lists('created_at', 'created_at'),
'note_types' => DB::table('note_types')->lists('type', 'type'),
'contacts' => DB::table('contacts')->select(DB::raw('CONCAT(first_name," ",last_name) as cname'))->lists('cname', 'cname'),
'accounts' => Account::lists('company_name', 'company_name'),
'users' => DB::table('users')->select(DB::raw('CONCAT(first_name," ",last_name) as uname'))->lists('uname', 'uname'),
'notes_trash' => $notes_trash,
'perPage' => $perPage
));
}
किसी भी सलाह की सराहना की जाएगी। धन्यवाद।
यदि आप आयात करते हैं तो हम 100 रिकॉर्ड कहें। यह ठीक काम करता है? त्रुटि के आधार पर –
(मैं उस ह्यूज कोड टुकड़े को देखने की कोशिश भी नहीं करूंगा), ऐसा लगता है कि आप एक्स प्लेसहोल्डर्स और केवल वाई मानों के साथ एक प्रश्न तैयार कर रहे हैं, वाई <एक्स –
@TheDisintegrator हां, यह ठीक काम करता है । –