Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/06/2008, 08:30
Avatar de T4ke0veR
T4ke0veR
 
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Respuesta: Separar las columnas de una bd en variables

ah entiendo
bueno hacer asi
Código PHP:
$connection mysql_connect('localhost''root''972190131')
    or die(
'Could not connect. Please contact the webmaster (webmaster@localhost). The error is: ' mysql_error());
mysql_select_db('rateit') or die('Could not select database. Please contact the webmaster (webmaster@localhost)');
$query 'SELECT * FROM users WHERE username ="' $usuari '";';
$result mysql_query($query) or die('Query failed: ' mysql_error());

$variable1 $result['campo'];

$variable2 $result['campo2']; 
y luego solo haces el echo a la variable q desees imprimir

Saludos
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...