Home ›
Correctly accessing CCK fields in SQL queries | drewish.comCorrectly accessing CCK fields in SQL queries | drewish.com
Submitted by Benjamin Melançon on June 5, 2010 - 10:37am
Link Title and URL:
Correctly accessing CCK fields in SQL queries | drewish.com since CCK can dynamically alter the database schema (when you add a field to a second content type or change the number of values) the query may break.
Fortunately CCK provides functions for finding a field's table and column names so it's simple to do it correctly
Karen Stevenson showed me how to do this ages ago, but i think i documented it in code instead of online, so here's the link to Drewish explaining.
More like this
- Agaric wants CCK Field Permissions to have smarter defaults (let the world see!)
- Looking at SQL to fix broken queries in a Drupal environment
- Calculate the sum of an entire result set of values with a single SQL query
- Drupal database layer (up to the D6 era) and limit clauses: use db_query_range()
- Give choice to show body field label, as for CCK field labels, on custom content types


Comments
Post new comment