Page 1 of 1

Insert text automatic into content table

Posted: Fri Oct 26, 2007 12:07 pm
by gacon
Hello all,

I would like to insert automatic some text into content table of DB of Joomla. Could you please tell me is this code is good? Do i should modify other things?

Thanks,

Code: Select all


$created_by = 65;
$datum=date("Y-m-d");
$publishdate = $datum;
$publishdate_readable =  $datum;

@mysql_query("
				INSERT INTO jos_content (
					title,
					introtext,
					`fulltext`,
					state,
					sectionid,
					mask,
					catid,
					created,
					created_by,
					checked_out,
					publish_up,
					attribs,
					version,
					access,
					ordering
				) VALUES (
					'". $titletext ."',
					'". $introtext ."',
					'". $maintext ."',
					'1',
					'".$sectionid."',
					'0',
					'".$catid."',
					'".$publishdate ."',
					'".$created_by."',
					'0',
					'". $publishdate ."',
					'introtext=0
					createdate=1',
					'1',
					'0',
					'1'
				)
			",$obj_db)