login | register
Tue 18 of Nov, 2008 (15:38 UTC)

bitweaver - Web Application Framework and CMS

Web Application Framework and CMS

Refresh cache

Is there an easy way to insert data to a DB table?

by Stephan Borg
Friday 15 of July, 2005
Posted to Developer's FAQ
If you had a simple table, say:
'my_faq' => "
	faq_id I4 AUTO PRIMARY,
	question C(255) NOTNULL,
	answer C(255) NOTNULL,
",


And you wanted to insert a record, you would prepare the data in the following array:
$my_data = array(
	'question' => "What is this project?",
	'answer' => "Its Bitweaver Application Framework!",
);


Then to insert it into the database:
$gBitDb->associateInsert( 'my_faq', $my_data );

Comments