Home » Topics » Pods 1.x » save_pod_item help
save_pod_item help
This topic contains 3 replies, has 3 voices, and was last updated by chris.pilko 1 year, 4 months ago.
-
AuthorPosts
-
December 27, 2011 at 10:12 pm #167064
I am submitting to a pod page the following
1234567891011121314151617<?php$nomcomplet = $_POST['nomcomplet'];$message = $_POST['txtzone'];$slug = $_POST['slug'];$decede= $_POST['decede'];$api = new PodAPI();// all of the values to save and options to use$params = array('datatype' => 'condoleances','columns' => array('name' => '$nomcomplet','description' => '$message','avisid' => '$decede'));$params = pods_sanitize($params);// create the item$condoleances_id = $api->save_pod_item($params)?>SQL_CALC_FOUND_ROWS DISTINCT
. , . FROM AS INNER JOIN AS ON . = . LEFT JOIN AS ON . = 22 AND . = .id LEFT JOIN AS ON . = . WHERE . = 4 AND ( . = ) ORDER BY . DESC LIMIT 0,15; Response: 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 ‘) ORDER BY . DESC LIMIT 0,15′ at line 13What am I doing wrong ?
I would like the user redirected to the previous page once the information is submitted, that is why i post the $slug.The pod I am saving to have the following structure:
name (txt) *
description (desc)
avisid (pick avis)Thanks !
December 28, 2011 at 1:32 pm #167067You edited your code, but did your SQL error change?
December 28, 2011 at 2:46 pm #167065He fixed it, it was a pod page conflict somewhere that was running code elsewhere. There was a findRecords running somewhere that wasn’t populating avisid.id which threw the MySQL error above.
December 29, 2011 at 2:10 am #167066Thanks Chris and Scott. I am in love with PODS now ! It is truly a magnificent piece of work !
-
AuthorPosts
You must be logged in to reply to this topic.