your question will remain unanswered even if you come back after decade.Be ready to be surprised :)
so dont waste your time here i already wasted more than a month.
go and get hooked on a community soft which have strong after install trouble shoot and feature installing support + support which you really expect that you will get from there.
I have a value now how do I pass it to SQL and make it return results? I can use simply PHP code like: mysql_query
Get ready for OWSQL101 :)
//add a new table to ow db
OW::getConfig()->addConfig('some_plugin_name', 'some_field_name', 'default_value');
//collecting text input
$form = new Form('sharebtn_settings');
$foo = new TextField('some_field_name');
$foo->setLabel('foo_name');
$foo->setHasInvitation(true);
$foo->setInvitation('foo_example');
$foo->setDescription('foo_desc');
$foo->addElement($foo);
$fooSave = new Submit('save');
$fooSave->setValue('fooSave');
$form->addElement($fooSave);
$this->addForm($form);
//posting form
if ( OW::getRequest()->isPost() && $form->isValid($_POST) )
{
$data = $form->getValues();
OW::getConfig()->saveConfig('some_plugin_name', 'some_field_name', trim($data['some_field_name']));
OW::getFeedback()->info('Some success msg');
$this->redirect();
}
//get data from db
$dbFoo = OW::getConfig()->getValue('some_plugin_name', 'some_field_name');
//get certain questions id from base
$baseQuestion = BOL_QuestionService::getInstance()->getQuestionData(array( OW::getUser()->getId() ), array('field_some_question_id'));//store field_some_question_id question in $fieldVariable
$fieldVariable = $baseQuestion[OW::getUser()->getId()]['field_some_question_id'];
Pay attention to the bold comments.
BOL_QuestionService::getInstance()->getQuestionData(array(OW::getUser()->getId()), array('FieldName'));
This will return the value of FieldName of a specific user.