NYCPHP Meetup

NYPHP.org

[nycphp-talk] mysql question

Analysis & Solutions danielc at analysisandsolutions.com
Wed Jun 4 14:04:11 EDT 2003


On Wed, Jun 04, 2003 at 12:15:05PM -0400, John W. Markert wrote:
> 
>      $query = "select * from advlistings, valsec, valprim
>       where ((advlistings.advId=$advId)
>       and (valsec.SecID=advlistings.secId)    
>       and (valprim.primeId=valsec.primeID))";
>
> the error that I get is:
>     Unknown column 'valprim.primeId' in 'where clause'

Why are you using different capitalization on field names?

   SecID is not the same as secId
   primeId is not the same as primeID

If you retyped this rather than cutting/pasting your code, you just proved 
why it's important to use the actual code.

If you did use the actual code here, did you mistype the cases of field
names in your query?

If those are the actual field name cases in the table structures, you 
really should make your life easier in the long run and come up with a 
field naming convention.

--Dan

-- 
     FREE scripts that make web and database programming easier
           http://www.analysisandsolutions.com/software/
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409



More information about the talk mailing list