Base de datos myql
Muchas gracias por la respuesta..
Te hago una nueva consulta... Este es mi codigo de la pagina donde muestro la noticia completa, es ahi donde creo este juego de registro que coloco a continuacion.
.---------------------------------------------------------------------
<?php require_once('Connections/Con_usuarios.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);
witch ($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;}
}
$colname_not = "-1";
if (isset($_GET['isj-noticia'])){
$colname_not = $_GET['isj-noticia'];}
mysql_select_db($database_Con_usuarios, $Con_usuarios);$query_not = sprintf("SELECT * FROM noticias WHERE id_noticias = %s ORDER BY id_noticias ASC", GetSQLValueString($colname_not, "int"));$not = mysql_query($query_not, $Con_usuarios) or die(mysql_error());$row_not = mysql_fetch_assoc($not);$colname_not = "-1";if (isset($_GET['-isj-noticia-'])) { $colname_not = $_GET['-isj-noticia-'];
}mysql_select_db($database_Con_usuarios, $Con_usuarios);$query_not = sprintf("SELECT * FROM noticias WHERE id_noticias = %s ORDER BY id_noticias ASC", GetSQLValueString($colname_not, "int"));$not = mysql_query($query_not, $Con_usuarios) or die(mysql_error());$row_not = mysql_fetch_assoc($not);$totalRows_not = mysql_num_rows($not);?>
------------------------------------------
bueno esto es el codigo..... Donde decis que puedo colocar la consulta que me enviste...
gracias
Te hago una nueva consulta... Este es mi codigo de la pagina donde muestro la noticia completa, es ahi donde creo este juego de registro que coloco a continuacion.
.---------------------------------------------------------------------
<?php require_once('Connections/Con_usuarios.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);
witch ($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;}
}
$colname_not = "-1";
if (isset($_GET['isj-noticia'])){
$colname_not = $_GET['isj-noticia'];}
mysql_select_db($database_Con_usuarios, $Con_usuarios);$query_not = sprintf("SELECT * FROM noticias WHERE id_noticias = %s ORDER BY id_noticias ASC", GetSQLValueString($colname_not, "int"));$not = mysql_query($query_not, $Con_usuarios) or die(mysql_error());$row_not = mysql_fetch_assoc($not);$colname_not = "-1";if (isset($_GET['-isj-noticia-'])) { $colname_not = $_GET['-isj-noticia-'];
}mysql_select_db($database_Con_usuarios, $Con_usuarios);$query_not = sprintf("SELECT * FROM noticias WHERE id_noticias = %s ORDER BY id_noticias ASC", GetSQLValueString($colname_not, "int"));$not = mysql_query($query_not, $Con_usuarios) or die(mysql_error());$row_not = mysql_fetch_assoc($not);$totalRows_not = mysql_num_rows($not);?>
------------------------------------------
bueno esto es el codigo..... Donde decis que puedo colocar la consulta que me enviste...
gracias