portal de noticias php

20/09/2017

0

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

Responder

Posts

20/10/2017

Diego Silva

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?
Responder

Que tal ter acesso a um e-book gratuito que vai te ajudar muito nesse momento decisivo?

Ver ebook

Recomendado pra quem ainda não iniciou o estudos.

Eu quero
Ver ebook

Recomendado para quem está passando por dificuldades nessa etapa inicial

Eu quero

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar