[nycphp-talk] Is there something wrong with this SQL query in PHP?

Anthony Wlodarski aw at
Tue Aug 14 16:24:37 EDT 2007

TADA!  We have a winner!

The function was bogging down on the second parameter.  I think I copied the
code from an earlier project and forgot to check the function syntax and now
the echo statement is returning a 1 so we know it is right on now (also made
changes in the main application and it is correctly working).  Some things I
will work on in regards to future development are this SQL injection and
correct checking before the query is ran.

Thanks everyone!

Anthony Wlodarski
Senior Technical Recruiter
Shulman Fleming & Partners
646-285-0500 x230
aw at

-----Original Message-----
From: talk-bounces at [mailto:talk-bounces at] On
Behalf Of Carlos A Hoyos
Sent: Tuesday, August 14, 2007 4:08 PM
To: NYPHP Talk
Subject: RE: [nycphp-talk] Is there something wrong with this SQL query in

In case this wasn't clear...
> On quick inspection, function mysql_fetch_assoc only takes one
> this might be a problem. mysql_fetch_assoc

Try Removing the second parameter from function mysql_fetch_assoc, i.e.
take out the MYSQL_ASSOC to read $row = mysql_fetch_assoc($result);

Carlos Hoyos

New York PHP Community Talk Mailing List

NYPHPCon 2006 Presentations Online

Show Your Participation in New York PHP

More information about the talk mailing list