[TYPO3] php help with writing to the sql database.
Dmitry Dulepov
dmitry at typo3.org
Wed Jun 27 15:09:13 CEST 2007
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.
> $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
More information about the TYPO3-english
mailing list