GPS Coordinates , data not saving
Posted: 29 Apr 2010, 14:02
Good Day
I have modified the Pocha Gallery backend by adding fields for GPS coordinates, I have added the fields in the database
namely sc1, sc2,sc3 (south coordinate) and ec1,ec2,ec3( east coordinate). The form field names are the same as the database field names.
Everything works to the point where the data is posted( look the line below )
//line code
The $post contains the the data I desire , but when It gets to the following, it does not to link the data in the post to the row. and subsequently all other data is saved but not the custom fields.
I have modified the Pocha Gallery backend by adding fields for GPS coordinates, I have added the fields in the database
namely sc1, sc2,sc3 (south coordinate) and ec1,ec2,ec3( east coordinate). The form field names are the same as the database field names.
Everything works to the point where the data is posted( look the line below )
//line code
Code: Select all
$id = $model->store($post); //you get id and you store the table dataCode: Select all
function store($data) { ....
$row =& $this->getTable();
// Bind the form fields to the Phoca gallery table
if (!$row->bind($data)) {
$this->setError($this->_db->getErrorMsg());
return false;
}
.....
// Store the Phoca gallery table to the database
if (!$row->store()) {
$this->setError($this->_db->getErrorMsg());
return false;
}