Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Clase de conexion y consultas.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ángel cruz  
View profile   Translate to Translated (View Original)
 More options Sep 16 2012, 1:52 pm
From: ángel cruz <bullg...@gmail.com>
Date: Sun, 16 Sep 2012 10:52:29 -0700 (PDT)
Local: Sun, Sep 16 2012 1:52 pm
Subject: Clase de conexion y consultas.

Saludos,

Estoy buscando información de como hacer una clase standar para
la conexión a la base de datos y partiendo de ahí, las consultas
respectivas.

Aquí les dejo el ejemplo de como hacer la consulta y la clase a
la conexión a la base de datos.

http://pastebin.com/tjJ9vvaz

En resumen, y para hacerlo mucho más claro necesito un ejemplo de una clase
de conexion a la db y como se haria una consulta ya que lo que siempre me
ha traido problemas es realizar la clase para la conexión, usualmente me ha
tocado usar clases que encuentro navegando y lo que hago es igualar
variables para no tener problemas con las consultas que tenga.

Agradecido por lo que puedan ayudarme,

Muchas gracias.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julian Bayardo  
View profile   Translate to Translated (View Original)
 More options Sep 16 2012, 3:21 pm
From: "Julian Bayardo" <y...@julianbayardo.com.ar>
Date: Sun, 16 Sep 2012 19:21:42 +0000
Local: Sun, Sep 16 2012 3:21 pm
Subject: Re: [php-arg] Clase de conexion y consultas.

Deberias usar mysqli


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DEH  
View profile   Translate to Translated (View Original)
 More options Sep 16 2012, 6:12 pm
From: DEH <deh1...@gmail.com>
Date: Sun, 16 Sep 2012 15:12:26 -0700 (PDT)
Local: Sun, Sep 16 2012 6:12 pm
Subject: Re: Clase de conexion y consultas.

Hola,

Te recomiendo que no inventes la rueda y uses algo que ya exista y esté
probado (adémas que suma al Curriculum).
¿Tenés experiencia con algún framework (Zend/Synphony/Yii...)? (Yii es la
más fácil de usar)
Si solo necesitas abstraer la base de datos podés usar directamente un ORM
tipo Propel http://www.propelorm.org/
Si lo querés programar vos, usar el partón "active record" como guía.
Saludos

Firma: yo

El domingo, 16 de septiembre de 2012 14:52:29 UTC-3, ángel cruz escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gonzalo Gabriel Caldeiro  
View profile   Translate to Translated (View Original)
 More options Sep 16 2012, 6:14 pm
From: Gonzalo Gabriel Caldeiro <gonzalocalde...@gmail.com>
Date: Sun, 16 Sep 2012 19:14:32 -0300
Local: Sun, Sep 16 2012 6:14 pm
Subject: Re: [php-arg] Clase de conexion y consultas.

Acá un ejemplo espero te sirva... Saludos.
El sep 16, 2012 4:19 p.m., "ángel cruz" <bullg...@gmail.com> escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gonzalo Gabriel Caldeiro  
View profile   Translate to Translated (View Original)
 More options Sep 16 2012, 6:15 pm
From: Gonzalo Gabriel Caldeiro <gonzalocalde...@gmail.com>
Date: Sun, 16 Sep 2012 19:15:51 -0300
Local: Sun, Sep 16 2012 6:15 pm
Subject: Re: [php-arg] Clase de conexion y consultas.

Perdón me comí el link acá va
http://www.cristalab.com/tutoriales/crear-una-clase-para-conectar-a-b...

Saludos
El sep 16, 2012 4:19 p.m., "ángel cruz" <bullg...@gmail.com> escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tordek  
View profile   Translate to Translated (View Original)
 More options Sep 17 2012, 4:39 am
From: Tordek <ked...@gmail.com>
Date: Mon, 17 Sep 2012 05:39:06 -0300
Local: Mon, Sep 17 2012 4:39 am
Subject: Re: [php-arg] Clase de conexion y consultas.
http://ar2.php.net/manual/en/class.pdo.php

$connection = new PDO("pgsql:host=example.com user=tordek password=42");
$result = PDO->query("SELECT * FROM foo");

foreach ($result as $row) {
        echo $row['bar'], ' ', $row['baz'];

}

Por favor, no usen más las llamadas low level. Para eso ya tenemos PDO.

2012/9/16 Gonzalo Gabriel Caldeiro <gonzalocalde...@gmail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ángel cruz  
View profile   Translate to Translated (View Original)
 More options Sep 17 2012, 11:10 pm
From: ángel cruz <bullg...@gmail.com>
Date: Mon, 17 Sep 2012 20:10:51 -0700 (PDT)
Local: Mon, Sep 17 2012 11:10 pm
Subject: Re: Clase de conexion y consultas.

Gracias a todos, me gusto mucho el enlace de Gonzalo.

De nuevo, gracias a todos por su ayuda. :D

El domingo, 16 de septiembre de 2012 13:22:29 UTC-4:30, ángel cruz escribió:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tordek  
View profile   Translate to Translated (View Original)
 More options Sep 17 2012, 11:30 pm
From: Tordek <ked...@gmail.com>
Date: Tue, 18 Sep 2012 00:30:29 -0300
Local: Mon, Sep 17 2012 11:30 pm
Subject: Re: [php-arg] Re: Clase de conexion y consultas.
On 18/09/12 00:10, ngel cruz wrote:

> Gracias a todos, me gusto mucho el enlace de Gonzalo.

Por favor, no uses eso. No uses llamadas a mysqli pelado Ese link
tiene 4 a os. En esos 4 a os PHP mejor . No inventes tu propio
"objeto de conexion a la DB"; ya hay uno: PDO.

> De nuevo, gracias a todos por su ayuda. :D

--
Guillermo O. Tordek Freschi. Programador, Escritor, Genio Maligno.
http://tordek.com.ar :: http://twitter.com/tordek

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ángel Cruz  
View profile   Translate to Translated (View Original)
 More options Sep 17 2012, 11:32 pm
From: Ángel Cruz <bullg...@gmail.com>
Date: Mon, 17 Sep 2012 23:01:52 -0430
Local: Mon, Sep 17 2012 11:31 pm
Subject: Re: [php-arg] Re: Clase de conexion y consultas.

Ohhh... No me había percatado de eso... Ya voy a investigar.

Gracias :D

El 17 de septiembre de 2012 23:00, Tordek <ked...@gmail.com> escribió:

--
Ángel Cruz - abr4xas
# Ubuntu User #29501
# Gnu/Linux counter #50841
# http://abr4xas.org
Twitter: @abr4xas
░ ░░ █░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█
░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░█
░▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░█
█▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒█
█▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█ PROBLEM?
░█▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█
░░█░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█
░░░█░░██░░▀█▄▄▄█▄▄█▄████░█

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »