Op Thursday 11 June 2009 10:00:12 schreef Sergio Rinaudo: > Hi, > thanks for reply. > I use Zend_Db to generate my queries, creating a select() object and then > pass it to the query() method or to the fetchAll() method, depending if I > have to iterate the data or not. > > My database table uses the utf8_unicode_ci charset. > > Actually I removed all escaping function from my variables and everything > works correctly, so I think Zend_Db do the work internally. > > I just need to have this confirmed :) > Thank you > > Sergio Rinaudo > > > > Subject: RE: [fw-general] How to save a string with quotes correctly to the > db Date: Thu, 11 Jun 2009 09:39:27 +0200 > From: [email protected] > To: [email protected]; [email protected] > Depends on what you are using, Zend_db, or directly an extension. > > Could you show us the code where you create and execute your query > to the database? > > Met > vriendelijke groet, > > Van: Sergio Rinaudo > [mailto:[email protected]] > > Verzonden: donderdag 11 juni 2009 9:05 > > Aan: [email protected] > > Onderwerp: [fw-general] How to save a string with quotes correctly to > the db > > Hello, > > I'm having a problem on saving descriptions ( long strings ) that have > quotes within them. > > So, I am asking which is the correct way to filter the string variable, > before save it to the db, > > and how to render it after getting from the database. > Thanks > > Sergio Rinaudo
It's a good practice to quote your strings during inserting with the quote() method from Zend_Db and escape them again in your view with the escape() helper. R, Jurian -- Jurian Sluiman Soflomo.com
