portal de noticias php

MySQL

PHP

20/09/2017

Boanoite, alguém aí pode me ajudar com com esse codigo abaixo:
Os erros estão nas linhas tracejadas




<?php require_once('Connections/conJd.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("mysqli_real_escape_string") ? mysqli_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;
}
}

$colname_RsNotDestaques = "-1";
if (isset($_GET['SIM'])) {
$colname_RsNotDestaques = $_GET['SIM'];
}



--------------------------------------------------
$conJd = mysqli_connect($banco);
-------------------------------------------------


$query_RsNotDestaques = sprintf("SELECT * FROM noticias WHERE not_principal = %s ORDER BY not_id DESC", GetSQLValueString($colname_RsNotDestaques, "text"));


-------------------------------------------------------------------------------------------------------------------
$RsNotDestaques = mysqli_query($conJd, $query_RsNotDestaques, $sql) or die(mysqli_error());
-----------------------------------------------------------------------------------------------------------------------------


$row_RsNotDestaques = mysqli_fetch_assoc($RsNotDestaques);
$totalRows_RsNotDestaques = mysqli_num_rows($RsNotDestaques);
$res = mysqli_query($conJd, $sql);
?>
Antonio Santos

Antonio Santos

Curtidas 0

Respostas

Diego Silva

Diego Silva

20/09/2017

Olá Antonio, tudo bem?

Qual a mensagem de erro que é disparada na sua tela?

Poderia mostrar também o conteúdo do arquivo conJd.php?
GOSTEI 0
POSTAR