Dreamweaver - juego de registro

 
Vista:

juego de registro

Publicado por veronica (1 intervención) el 22/07/2014 21:02:17
buen dia tengo un problema grave con el dreamweaver

inserto un juego de registros todo marcha bien pero me salen 2 errores:


Warning: mysql_select_db() expects parameter 2 to be resource, object given in C:\server\Web\damasco\cliente.php on line 34

Warning: mysql_query() expects parameter 2 to be resource, object given in C:\server\Web\damasco\cliente.php on line 36

aqui el codigo:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php require_once('Connections/link.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
mysql_select_db($database_link, $link);
$query_Recordset1 = "SELECT * FROM productos";
$Recordset1 = mysql_query($query_Recordset1, $link) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
 
mysql_free_result($Recordset1);
?>

cuando modifico el mysql por mysqli el juego de registro desaparece... a que se debe? debo usar una version anterior de php?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
-1
Responder
Imágen de perfil de xve
Val: 96
Oro
Ha mantenido su posición en Dreamweaver (en relación al último mes)
Gráfica de Dreamweaver

juego de registro

Publicado por xve (369 intervenciones) el 22/07/2014 23:29:21
Hola Veronica, entiendo que una de las dos variables que utilizas esta vacia...
Has probado ha hacer un:

1
echo $database_link, $link;

Para ver que las variables no están vacías?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar