[TYPO3] php help with writing to the sql database.

Rens Admiraal typo3 at ambitiondesign.nl
Wed Jun 27 15:19:41 CEST 2007


Op 27-jun-2007, om 15:09 heeft Dmitry Dulepov het volgende geschreven:

> Hi!
>
> dave typo wrote:
>> I keep getting this error
>>
>> 2: SQL error: 'Unknown column 'tx_hldamgallery_fontsize' in 'field  
>> list''
>> (tt_content:387)
>>
>>
>> after saving the gallery.
>>
>> and do not understand why.
>
> Most likely no such column in database.
>

It could be you should use the field tx_hldamgallery.fontsize, the  
dot seperates the tablename from the fieldname

>> $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tx_hldamgallery_text,
>> tx_hldamgallery_xcoord, 'tt_content', 'uid=' . $galleryCID . ' and  
>> pid =
>> ' .
>> $galleryPID, '', '', '');
>
> Why do you pass both uid and pid? uid is unique, it is enough to use
> only uid. Also you are making sql injection possible because you do  
> not
> quote database parameters.
>
> -- 
> Dmitry Dulepov
> TYPO3 freelancer / TYPO3 core team member
> Web: http://typo3bloke.net/
> Skype: callto:liels_bugs
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list