ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:substr

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
Next revisionBoth sides next revision
v5:reference:connection:substr [2016/04/10 23:15] – [Usage] mnewnhamv5:reference:connection:substr [2016/04/10 23:41] – [Desscription] mnewnham
Line 10: Line 10:
       )       )
 </WRAP> </WRAP>
-===== Desscription =====+===== Description =====
 The method ''substr()'' creates an SQL statement that returns the substring of a specified string field.  The method ''substr()'' creates an SQL statement that returns the substring of a specified string field. 
  ===== Parameters =====  ===== Parameters =====
Line 26: Line 26:
 <code php> <code php>
 /* /*
-* To return the an associative array of codes plus the first 20 characters of a description.+* To return the an associative array of codes plus  
 +the first 20 characters of a description.
 */ */
 $sql = "SELECT code, {$db->substr('description',1,20)} FROM some_table"; $sql = "SELECT code, {$db->substr('description',1,20)} FROM some_table";
v5/reference/connection/substr.txt · Last modified: 2016/04/10 23:42 by mnewnham