ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:dictionary:getcommentsql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v5:dictionary:getcommentsql [2016/03/21 01:43] mnewnhamv5:dictionary:getcommentsql [2017/07/22 18:10] (current) mnewnham
Line 1: Line 1:
 ====== getCommentSql ====== ====== getCommentSql ======
 ~~NOTOC~~ ~~NOTOC~~
 +<WRAP info>Note that this function is currently only supported on Oracle databases</WRAP>
 <WRAP right box> <WRAP right box>
 == Syntax == == Syntax ==
Line 11: Line 12:
 The method ''getCommentSql()'' returns a string containing the SQL necessary to read the column comments from a table, if the database supports it.  The method ''getCommentSql()'' returns a string containing the SQL necessary to read the column comments from a table, if the database supports it. 
  
-Note that this function is currently only supported on Oracle databases+
 ---------------------------------- ----------------------------------
 ===== Usage ===== ===== Usage =====
Line 19: Line 20:
 */ */
 $dict = newDataDictionary($db); $dict = newDataDictionary($db);
-$s = $dict->getColumnSql('mytable','mycolumn');+$s = $dict->getCommentSql('mytable','mycolumn');
 print $s; print $s;
 /* /*
-* Prints: select comments from USER_COL_COMMENTS where TABLE_NAME='mytable' and COLUMN_NAME='mycolumn'+* Prints: SELECT comments  
 +            FROM USER_COL_COMMENTS  
 +           WHERE TABLE_NAME='mytable'  
 +            AND COLUMN_NAME='mycolumn'
 */ */
 </code> </code>
v5/dictionary/getcommentsql.txt · Last modified: 2017/07/22 18:10 by mnewnham