Tema: Ver php
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/01/2008, 04:09
Ramonromero
 
Fecha de Ingreso: enero-2008
Ubicación: Valencia
Mensajes: 65
Antigüedad: 16 años, 3 meses
Puntos: 2
Re: Ver php

Estoy haciendo una web sobre la liga de futbol de mi hijo, lo que hice es crear un archivo de excel y simplemente subirlo, el cual se ven los datos, pero preferiria con una base de datos PHP. La direccion es http:\\webs.ono.com/rafelcf. Pero es que no lo consigo. Aunque todos sabemos que seria mas comodo con base de datos.

Mirar, esto es lo que me dice al ver en el navegador:

Warning: virtual() [function.virtual]: Unable to include '/Connections/Liga07.php' - request execution failed in D:\Mi web\wamp\www\Liga07\Untitled-5.php on line 1

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in D:\Mi web\wamp\www\Liga07\Untitled-5.php on line 32

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in D:\Mi web\wamp\www\Liga07\Untitled-5.php on line 34

Y este es el codigo de la pagina:

<?php virtual('/Connections/Liga07.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$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_Liga07, $Liga07);
$query_Recordset1 = "SELECT * FROM jugadores";
$Recordset1 = mysql_query($query_Recordset1, $Liga07) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
</head>

<body>
<table border="1">
<tr>
<td>Num</td>
<td>Nombre</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['Num']; ?></td>
<td><?php echo $row_Recordset1['Nombre']; ?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>


Y ahora pregunto:
¿Hay que hacer una pagina .html para poder ver los datos?
¿Como la hago?
Bufff no me entero con php.

Última edición por Ramonromero; 20/01/2008 a las 15:09