<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Inserting data into the database</title>
		<link>https://www.cotonti.com</link>
		<description>Останні повідомлення в темі</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Wed, 15 Apr 2026 11:41:31 -0000</pubDate>

		<item>
			<title>lukgoh</title>
			<description><![CDATA[<p>
	Yeah it is using its own tables. Awesome, this looks very useful! Thank you GHengeveld. I'll post here if I need any more help. </p>
]]></description>
			<pubDate>Thu, 12 Січ 2012 17:54:58 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32555]]></link>
		</item>
		<item>
			<title>GHengeveld</title>
			<description><![CDATA[<p>
	If you intend to build something that uses it's own database table such as a custom module, you might want to consider using <a href="http://www.cotonti.com/forums?m=posts&amp;p=31506">SimpleORM</a>. It's a bit more complex but will save a lot of development time.</p>
]]></description>
			<pubDate>Thu, 12 Січ 2012 16:16:26 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32547]]></link>
		</item>
		<item>
			<title>lukgoh</title>
			<description><![CDATA[<p>
	Thank you guys! </p>
]]></description>
			<pubDate>Thu, 12 Січ 2012 11:34:12 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32542]]></link>
		</item>
		<item>
			<title>GHengeveld</title>
			<description><![CDATA[<p>
	Dyllon is correct. This is the syntax for Siena. For Genoa you'll need to do sed_sql_prep() on strings and cast numbers to int or float.</p>
<p>
	You can use extrafields to add the fields to the database table and then use regular queries like this to insert/update/select/delete etc. However, extrafields is only available for users, pages and structure.</p>
]]></description>
			<pubDate>Thu, 12 Січ 2012 11:25:32 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32541]]></link>
		</item>
		<item>
			<title>Dyllon</title>
			<description><![CDATA[<p>
	The safest way I'm aware of is by defining what the variable contains when inserting, or updating it to your sql table. You can accomplish that by doing something like this:</p>
<pre class="brush:php;">
$variable_int = 0;
$variable_string = 'string';

$db-&gt;insert($db_table_name, array(
	'field_name' =&gt; (string) $variable_string,
	'field_name' =&gt; (int) $variable_int
));</pre>
]]></description>
			<pubDate>Thu, 12 Січ 2012 04:39:15 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32536]]></link>
		</item>
		<item>
			<title>lukgoh</title>
			<description><![CDATA[<p>
	Thank you Dave, I appreciate your effort to help me. I am pretty sure that the user extrafields use the same functions as other core queries so I guess I can work it out from those.</p>
]]></description>
			<pubDate>Thu, 12 Січ 2012 00:55:14 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32535]]></link>
		</item>
		<item>
			<title>Dave</title>
			<description><![CDATA[<p>
	my small conclusion: i cant answer u @ ur question but im almoust sure (without knowing code) that cotonti / user_extra wont allow any SQL in the form, thats how i'd design it and probably how cot devs did it</p>
<p>
	forgive me my english, its weak sometimes :)</p>
]]></description>
			<pubDate>Thu, 12 Січ 2012 00:50:02 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32534]]></link>
		</item>
		<item>
			<title>lukgoh</title>
			<description><![CDATA[<p>
	I was wondering if Cotonti had a function I needed to use to check the data being inputed, to stop any possible SQL injections from the form? I didn't think of using the user extrafields, but in the interest of learning I would still like an awnser to this question.</p>
<p>
	Luke.</p>
]]></description>
			<pubDate>Ср, 11 Січ 2012 18:30:13 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32517]]></link>
		</item>
		<item>
			<title>Dave</title>
			<description><![CDATA[<p>
	im not sure if i understand u correct but why not use <u><em>user extrafields</em></u> ?</p>
]]></description>
			<pubDate>Ср, 11 Січ 2012 18:19:48 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32515]]></link>
		</item>
		<item>
			<title>lukgoh</title>
			<description><![CDATA[<p>
	I'm new to extension development and I was wondering what the safest way is to insert user data into the database. </p>
<p>
	I have a form for users to fill out and I was just curious about SQL injections.</p>
<p>
	Luke.</p>
]]></description>
			<pubDate>Ср, 11 Січ 2012 11:09:54 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ua/forums?m=posts&q=6715&d=0#post32508]]></link>
		</item>
	</channel>
</rss>