Documente Academic
Documente Profesional
Documente Cultură
Desprogrmate
Tecnologa, Informtica, Programacin ... http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=HTML&widgetId=HTML2&action=editWidget§ionId=main
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=HTML&widgetId=HTML2&action=editWidget§ionId=main Mostrando las entradas ms recientes con la etiqueta CodeIgniter Mostrar las entradas ms antiguas Mostrando las entradas ms recientes con la etiqueta CodeIgniter Mostrar las entradas ms antiguas
> UPDATE mitabla SET titulo = 'titulo' , nombre = 'nombre' , fecha = 'fec' WHERE id = $id La funcin $this->db->update() admite un tercer parmetro que hace a su vez de funcin where, ej: $datos = array( 'titulo' => $titulo, 'nombre' => $nombre, 'fecha' => $fec ); $donde = array ( 'id' => $id ); $this->db->update('mitabla', $datos, $donde); La instruccin resultante seria la misma del ejemplo anterior. En la actualizacin de datos se puede utilizar tambin la funcin $this->db->set(). Borrando Datos: La funcin $this->db->delete(); genera una cadena de eliminacin SQL y ejecuta la consulta. $this->db->delete('mitabla', array('id' => $id)); > DELETE FROM mitabla WHERE id = $id Tambin se puede utilizar la funcin $this->db->where('id', $id) $this->db->where('id', $id); $this->db->delete('mitabla'); La instruccin resultante seria la misma del ejemplo anterior. Otras funciones para el borrado: $this->db->empty_table(); $this->db->truncate(); 0 comentarios http://www.blogger.com/post-edit.g?
$this->db->where('fecha <', $fec); $this->db->order_by("titulo", "desc"); $consulta = $this->db->get(); // SELECT titulo, descripcion FROM mitabla WHERE nombre = 'nombre' AND fecha < 'fec' El AND lo aade directamente la sentencia $this->db->where y si no ponemos ningn signo nos aade directamente el =, sino el que especifiquemos (fijarse en las dos sentencias where). Tambin se puede hacer mediante un arreglo asociativo: $datos = array ('nombre' => $nombre, 'fecha <' => $fec, 'titulo !=' => $titulo); $this->db->where($datos); //WHERE nombre = 'nombre' AND fecha < 'fec' AND titulo != 'titulo' Otras instrucciones: $this->db->get_where(); $this->db->select_max(); $this->db->select_min(); $this->db->select_avg(); $this->db->select_sum(); $this->db->join(); $this->db->or_where(); $this->db->where_in(); $this->db->or_where_in(); $this->db->where_not_in(); $this->db->or_where_not_in(); $this->db->like(); $this->db->or_like(); $this->db->not_like(); $this->db->or_not_like(); $this->db->group_by(); $this->db->distinct(); $this->db->having(); $this->db->or_having(); $this->db->limit(); $this->db->count_all_results(); $this->db->count_all(); 0 comentarios http://www.blogger.com/post-edit.g? blogID=6285614063972063977&postID=8817469697857754006&from=pencil http://www.blogg er.com/post-edit.g?blogID=6285614063972063977&postID=8817469697857754006&from=pencil Etiquetas: Active Record, BBDD, CodeIgniter Entradas ms recientes Entradas antiguas Pgina principal Suscribirse a: Entradas (Atom)
desprogramate buscando
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=HTML&widgetId=HTML4&action=editWidget§ionId=sidebar
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=HTML&widgetId=HTML4&action=editWidget§ionId=sidebar
2010 (11)
2009 (19)
2008 (6)
Iniciar XP en modo seguro o a pruebas de fallos Del primer ratn al ratn biomtrico
diciembre (1) Adobe Flex 3 - Parte I noviembre (4) Portatil HP Compaq Lo ultimo en moviles Adobe Flex Data Definition Language (DDL) - Oracle octubre (1) Quitar messenger XP
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=BlogArchive&widgetId=BlogArchive2&action=editWidget§ion
Te recomendamos
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=BlogList&widgetId=BlogList1&action=editWidget§ionId=sideb
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=HTML&widgetId=HTML3&action=editWidget§ionId=sidebar
Etiquetas
Active Record (2) BBDD (2) CodeIgniter (2) excel (1) html (1) Javascript (4) Oracle (9) Programacin (16) Sistema Operativo (3) Software (1) Software Libre (2) Tecnologa (5) Tutoriales (2) Ubuntu (1) Windows (4)
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=Label&widgetId=Label1&action=editWidget§ionId=sidebar
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=Label&widgetId=Label1&action=editWidget§ionId=sidebar Todas las entradas de este blog estn bajo una licencia de creative commons. Puede reproducirse el contenido siempre y cuando quede claro el autor con un enlace directo a la entrada. http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=Text&widgetId=Text1&action=editWidget§ionId=sidebar
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=Text&widgetId=Text1&action=editWidget§ionId=sidebar Quieres contactar con nosotros? Envianos un mail http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=Text&widgetId=Text2&action=editWidget§ionId=sidebar
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=Text&widgetId=Text2&action=editWidget§ionId=sidebar
http://www.blogger.com/rearrange? blogID=6285614063972063977&widgetType=HTML&widgetId=HTML1&action=editWidget§ionId=sidebar