Warning: implode() [function.implode]: Invalid arguments passed in /home/maynooth/public_html/libraries/joomla/database/database/mysql.php on line 534
Hi,
I am getting the following error when I try to write a simple 2 text form to a 2 columns table in a mysql database.
Anyone got any ideas?
Hi,
I am getting the following error when I try to write a simple 2 text form to a 2 columns table in a mysql database.
Anyone got any ideas?
Is this the code you are talking about?
<?php
if($paramsvalues->dbconnection == "Yes"){
$user = JFactory::getUser();
$row =& JTable::getInstance("test999", "Table");
srand((double)microtime()*10000);
$inum = "I" . substr(base64_encode(md5(rand())), 0, 16);
JRequest::setVar( "recordtime", JRequest::getVar( "recordtime", date("Y-m-d")." - ".date("H:i:s"), "post", "string", "" ));
JRequest::setVar( "ipaddress", JRequest::getVar( "ipaddress", $_SERVER["REMOTE_ADDR"], "post", "string", "" ));
JRequest::setVar( "uid", JRequest::getVar( "uid", $inum, "post", "string", "" ));
JRequest::setVar( "cf_user_id", JRequest::getVar( "cf_user_id", $user->id, "post", "int", "" ));
$post = JRequest::get( "post" , JREQUEST_ALLOWRAW );
if (!$row->bind( $post )) {
JError::raiseWarning(100, $row->getError());
}
if (!$row->store()) {
JError::raiseWarning(100, $row->getError());
}
global $row_test999;
$row_test999 = $row;
}
?>
Hi decbuck,
Sorry, I forgot you can't get the SQL in the latest version. Please turn on DeBug and paste the Post Array here (it will show as part of the DeBug page info, if you ahve a ReDirect URL please remove it temporarily). Maybe that will give a clue.
Bob
Sorry, I forgot you can't get the SQL in the latest version. Please turn on DeBug and paste the Post Array here (it will show as part of the DeBug page info, if you ahve a ReDirect URL please remove it temporarily). Maybe that will give a clue.
Bob
_POST: Array ( [text_1] => hello [text_0] => world [d12d30043967aec15a7a980acadc7d95] => 1 )
Hi decbuck,
Nothing wrong there - mystifying?
Which versions of Joomla & CF are you using?
The line number is slightly different in my J1.5.8 but I think this is where the problem arises:
Bob
Nothing wrong there - mystifying?
Which versions of Joomla & CF are you using?
The line number is slightly different in my J1.5.8 but I think this is where the problem arises:
$this->setQuery( sprintf( $fmtsql, implode( ",", $fields ) , implode( ",", $values ) ) );
The error suggest that one or both of these arrays -$values or $fields - is empty.Bob
joomla 1.5 and cf 3.0
This is really bugging me now. I want to expand this feature but just trying to get simple example working first.
Thanks for your help. Any more suggestions let me know.
This is really bugging me now. I want to expand this feature but just trying to get simple example working first.
Thanks for your help. Any more suggestions let me know.
what about general settings for the form.
I have MYSQL statement set to ENGINE, Form Method to Post
Do these matter
I have MYSQL statement set to ENGINE, Form Method to Post
Do these matter
Hi decbuck,
I've never seen this problem reported before for ChronoForms.
Max may have a suggestion . . . , if not we're into hacking the core code to add some diagnostics and see what's happening.
Bob
I've never seen this problem reported before for ChronoForms.
Max may have a suggestion . . . , if not we're into hacking the core code to add some diagnostics and see what's happening.
Bob
Hi guys, no idea here too, try to test sometime and see if anything changes!
Regards
Max
Regards
Max
Hi,
Thanks for that. Maybe my database structure is incorrect. I just realised I needa cf_id column in my database. Do I need anything else?
Thanks for that. Maybe my database structure is incorrect. I just realised I needa cf_id column in my database. Do I need anything else?
Hi decbuck,
Copy the form in the Form Manager, then click 'Create Table' for the new version. You can look at the columns in the created table to see hwat is needed in your existing table.
(Or if you have no critical data, just drop the table and create a new one.)
Bob
Copy the form in the Form Manager, then click 'Create Table' for the new version. You can look at the columns in the created table to see hwat is needed in your existing table.
(Or if you have no critical data, just drop the table and create a new one.)
Bob
This topic is locked and no more replies can be posted.