From: Osullivan L. <L.O...@sw...> - 2009-08-27 13:28:51
|
Hi Jon, I was under the assumption that the prepare method for PDO made all the necessary changes to the sql statement for escaping apostrophes. The problem occurs in the Voyager driver file in the PatronLogin function and states "Call to a member function execute() on a non-object". The function works fine unless there is an apostrophe in the user's surname which is used for authentication in Voyager. I have tried hard-coding O''Sullivan into the sql statement to test it but that returns an invalid login details message. Something is happening in the prepare() stage which causes the execute() to fail. If you have any idea I'd be eager to hear them! Kind Regards, Luke -----Original Message----- From: Jon Gorman [mailto:jon...@gm...] Sent: 24 August 2009 16:02 To: Osullivan L. Cc: vuf...@li... Subject: Re: [VuFind-Tech] Users with Apostrophes When you say you tried adding an escape function, what do you mean? Did you use the PEAR DB escapeSimple() function or the quoteSmart() functions? Where did you try escaping it? That is, what class/file were you modifying? What errors do you get? Sorry, I try to keep up with the VuFind project, but there's so many people running so many versions. It sounds like your gut feeling that it is an escape problem is probably correct, but without seeing what changes you did it's hard to say what you did. (For example, somewhere else I've seen a similar question asked and it turned out the person was doing their own function which tried to escape it by putting a \ in front of the ', but since sql/most database implementations requires doubling the single-quote that will not work. Jon Gorman On Mon, Aug 24, 2009 at 9:44 AM, Osullivan L.<L.O...@sw...> wrote: > Dear All, > > > > Has anyone come across any difficulties using the PEAR DB execute function > with apostrophes? > > > > Voyager uses patron surnames for authentication and people with surnames > like mine throw an object error. I've tried adding an escape function to the > surnames but it still throws the error. Any ideas? > > > > Thanks > > > > Luke O'Sullivan > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Vufind-tech mailing list > Vuf...@li... > https://lists.sourceforge.net/lists/listinfo/vufind-tech > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Vufind-tech mailing list Vuf...@li... https://lists.sourceforge.net/lists/listinfo/vufind-tech |