Forums

Help, can't create new record from admin

peptobismol 18 Mar, 2009
i keep getting INSERT error .. I can UPDATE fine.
Tablechronoforms_projects::store failed - Unknown column 'ordering' in 'field list' SQL=INSERT INTO `jos_chronoforms_projects` ( `cf_id`,`p_name`,`p_time`,`p_slot`,`p_location`,`p_category`,`p_description`,`ordering` ) VALUES ( '0','project 2','22/22/22','22','georgetown','outdoor','sdfsdfsdf','' )


As you can see the 'cf_id' field keep getting a '0' value even though I set it as a NULL in my record edit template. 'cf_id' is a auto incremental, prime. And not sure where the 'ordering' field came from.. I'm guessing if there's an error, it pops up.


<p>Location:<select name="p_location">
  <option value="georgetown">Georgetown</option>
  <option value="lexington">Lexington</option>
  <option value="winchester">Winchester</option>
</select>
</p>

<p>Project Name:<input type="text" name="p_name"></p>
<p>Project Time:<input type="text" name="p_time"></p>
<p>Number of Position:<input type="text" name="p_slot"></p>
<p>Description:<textarea rows="10" cols="40" name="p_description"></textarea></p>
<p>Category:<select name="p_category">
  <option value="outdoor">Outdoors</option>
  <option value="indoor">Indoors</option>
  <option value="labor">Labor</option>
  <option value="people">People Service</option>
  <option value="photography">Photography</option>
  <option value="setup">Set up & Clean up</option>
</select>
</p>

<input type="hidden" name="cf_id" value="">


here are all my fields
cf_id,p_location,p_name,p_time,p_slot,p_description,p_category


thanks,
peptobismol 19 Mar, 2009
Well, I don't know if this is a bug or what..
I might be hacking this...
in
admin.chronoconnectivity.php

line 756
Change to
<input type="hidden" name="<?php echo $primary; ?>" value="" />

And With every table you make, add a field 'ordering' at the end. I have no idea why the query is adding 'ordering' at the end. I can't find it.
This topic is locked and no more replies can be posted.