el codigo:
Código php:
Ver original<?php require_once('../Connections/basbase.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
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;
}
}
$query_Recordset1 = "SELECT * FROM list_movies";
?><!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ítulo</title>
</head>
<body>
<table border="1">
<tr>
<td>ID</td>
<td>name_movie</td>
<td>lenguage</td>
<td>Sub</td>
<td>year</td>
<td>tipe</td>
<td>format</td>
<td>mn</td>
<td>info</td>
<td>img</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['ID']; ?></td>
<td><?php echo $row_Recordset1['name_movie']; ?></td>
<td><?php echo $row_Recordset1['lenguage']; ?></td>
<td><?php echo $row_Recordset1['Sub']; ?></td>
<td><?php echo $row_Recordset1['year']; ?></td>
<td><?php echo $row_Recordset1['tipe']; ?></td>
<td><?php echo $row_Recordset1['format']; ?></td>
<td><?php echo $row_Recordset1['mn']; ?></td>
<td><?php echo $row_Recordset1['info']; ?></td>
<td><?php echo $row_Recordset1['img']; ?></td>
</tr>
</table>
</body>
</html>
<?php
?>
con funcion
Código php:
Ver original<?php require_once('../Connections/basbase.php'); ?>
<?php
function tab1(){
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
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;
}
}
$query_Recordset1 = "SELECT * FROM list_movies";
?><!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ítulo</title>
</head>
<body>
<table border="1">
<tr>
<td>ID</td>
<td>name_movie</td>
<td>lenguage</td>
<td>Sub</td>
<td>year</td>
<td>tipe</td>
<td>format</td>
<td>mn</td>
<td>info</td>
<td>img</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['ID']; ?></td>
<td><?php echo $row_Recordset1['name_movie']; ?></td>
<td><?php echo $row_Recordset1['lenguage']; ?></td>
<td><?php echo $row_Recordset1['Sub']; ?></td>
<td><?php echo $row_Recordset1['year']; ?></td>
<td><?php echo $row_Recordset1['tipe']; ?></td>
<td><?php echo $row_Recordset1['format']; ?></td>
<td><?php echo $row_Recordset1['mn']; ?></td>
<td><?php echo $row_Recordset1['info']; ?></td>
<td><?php echo $row_Recordset1['img']; ?></td>
</tr>
</table>
</body>
</html>
<?php
?><? } ?>
con global como ?:S