Ver Mensaje Individual
  #9 (permalink)  
Antiguo 19/11/2013, 21:49
horusorion
 
Fecha de Ingreso: febrero-2013
Mensajes: 115
Antigüedad: 11 años, 2 meses
Puntos: 5
Respuesta: Comparar 2 tablas

no se si hagas la conexion a la base de datos igual que yo... pero seria asi...

Código PHP:
Ver original
  1. <?php
  2. $bd = "redsocial";
  3. $cbd = mysql_pconnect("servidor", "usuario", "clave") or trigger_error(mysql_error(), E_USER_ERROR);
  4.  
  5.  
  6.  
  7. ?>
  8. <?php
  9. if (!isset($_SESSION)) {
  10.     session_start();
  11. }
  12.  ?>

luego donde dice
Código PHP:
Ver original
  1. mysql_select_db("BASE DE DATOS", "CONEXION A LA BASE DE DATOS");
quedara asi!!!
Código PHP:
Ver original
  1. mysql_select_db("$bd", "$cbd");

y donde dice
Código PHP:
Ver original
  1. $tabla1 = mysql_query($consulta_tabla1, "CONEXION A LA BASE DE DATOS""CONEXION A LA BASE DE DATOS") or die(mysql_error());

quedara asi....
Código PHP:
Ver original
  1. $tabla1 = mysql_query($consulta_tabla1, "$cbd") or die(mysql_error());
igual para la tabla 2......
espero haberte podido ayudar....
__________________
http://tutorialesdelweb.blogspot.com/TutorialesWeb(principiantes)