SELECT r.nid, r.vid, r.uid, r.title, r.body, r.teaser, t.tid, t.name, v.vid, v.name, v.description FROM node_revisions AS r INNER JOIN term_node USING ( nid ) INNER JOIN term_data AS t USING ( tid ) INNER JOIN vocabulary AS v USING ( vid ) LIMIT 0 , 30
*MySQL said: *[image: Documentation]http://dev.mysql.com/doc/refman/5.0/en/error-returns.html #1052 - Column 'vid' in from clause is ambiguous
On Wed, Jul 23, 2008 at 11:28 PM, Chris Johnson cxjohnson@gmail.com wrote:
Note that in the vocabulary table and the term_data table, "vid" stands for "vocabulary id". In the node_revision table, "vid" stands for "version id" (unfortunately).
The following SQL should display all of the data from the tables described (untested):
SELECT r.nid, r.vid, r.uid, r.title, r.body, r.teaser, t.tid, t.name, v.vid, v.name, v.description FROM node_revision AS r INNER JOIN term_node USING(nid) INNER JOIN term_data AS t USING(tid) INNER JOIN vocabulary AS v USING(vid);
On Wed, Jul 23, 2008 at 11:29 AM, bharani kumar bharanikumariyerphp@gmail.com wrote:
vocabulary table
[php] vid name description 2 vegitable this is vegitable
[/php] node_revision table [php] nid vid uid title body teaser 21 21 1 mouse program test test [/php]
term_data table [php] tid vid name 5 2 ladies finger 6 2 onion 7 2 beetroot 8 2 ladies finger2 9 2 onion2 10 2 beetroot2 [/php]
term_node table [php] nid tid 18 4 21 5 21 7 21 8 19 10 20 10 21 10 19 11 [/php]
Hi friends
the above is my table can any one tell the sql query for that ?????
id related all content must display with that query...
any great idea,,,plz i welcome
:D
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]