Welcome Guest, Not a member yet? Register   Sign In
Missing column data in join clause
#8

[eluser]nofearinc[/eluser]
@jedd,

Thanks for your comment. The SQL from the comment above is the correct SQL that runs flawlessly in my phpMyAdmin or HeidiSQL client. user_id column has values and everything is OK. When I try the active record pattern that generates the same SQL, I just retrieve null for my user_id column. That's what I find weird.

Currently I'm selecting only 4 columns (instead of select *) and user_id is OK, but it is no solution for my problem.

As for the pattern, I'm used to ActiveRecord and Object Relational Mapping and I prefer using them instead of writing plain SQL. When needed, I patch with SQL queries.

Speaking about the 'select extraction' - this is a code snippet from a library that uses different 'users' tables so I have no information about the table structure. User passes table name, username and password - all other fields are hidden (no reflection is applied). That's why I need 'select all' and I can't check all the fields statically without knowing about them.


Messages In This Thread
Missing column data in join clause - by El Forum - 12-14-2009, 07:17 PM
Missing column data in join clause - by El Forum - 12-14-2009, 07:36 PM
Missing column data in join clause - by El Forum - 12-15-2009, 02:56 AM
Missing column data in join clause - by El Forum - 12-15-2009, 03:50 AM
Missing column data in join clause - by El Forum - 12-15-2009, 04:05 AM
Missing column data in join clause - by El Forum - 12-15-2009, 04:10 AM
Missing column data in join clause - by El Forum - 12-15-2009, 10:40 AM
Missing column data in join clause - by El Forum - 12-15-2009, 11:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB