Changeset 10017 in spip-zone
- Timestamp:
- Mar 1, 2007, 12:48:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/_stable_/crayons/inc/crayons.php
r10016 r10017 99 99 100 100 function valeur_colonne_table($table, $col, $id) { 101 if (is_scalar($id)) { 102 $where = id_table_objet($table) . '=' . $id; 103 } else { 104 $where = $and = ''; 105 foreach ($id as $col => $id) { 106 $where .= $and . $col . '=' . $id; 107 $and = ' AND'; 108 } 109 } 101 110 $s = spip_query( 102 111 'SELECT ' . (is_array($col) ? implode($col, ', ') : $col) . 103 112 ' FROM spip_' . table_objet($table) . 104 ' WHERE ' . id_table_objet($table) . '=' . $id);113 ' WHERE ' . $where); 105 114 if ($t = spip_fetch_array($s)) { 106 115 return is_array($col) ? $t : $t[$col];
Note: See TracChangeset
for help on using the changeset viewer.