Mysql kan ikke finde ud af OR
Hej Eksperter,Hvorfor kan min mysql ikke finde ud af dette?
$strPost = $mysqli->real_escape_string($_GET['title']); $numbPost = $mysqli->real_escape_string((int)$_GET['id']);
$getPost = $mysqli->query( "SELECT * FROM lb_articles WHERE article_url='".$strPost."' OR article_id='".$_GET['id']."' LIMIT 1" ) OR DIE( $mysqli->error );
$showPost = $getPost->fetch_assoc();
if ( $_GET['id'] ) { echo "<pre>";print_r($showPost);echo "</pre>";/* header('Location:'.$showPost['article_url'].'.html', true, 301); */ } // REDIRECT URL
else {
echo "<h1>".$showPost['article_titel']."</h1><hr>";
echo "<span>".str_replace(array(',',', '),' ⎮ ',$showPost['article_category'])." - ".$showPost['article_updated']."</span>";
echo "<p>".nl2br($showPost['article_content'])."</p>";
echo "<strong>URL: <input size=\"90\" value=\"http://".$_SERVER['SERVER_NAME']."/".$showPost['article_url'].".html\"> — ".$numbPost."</strong>";
// echo "<pre>"; print_r($showPost); echo "</pre>";
}
Denne mysql linje: SELECT * FROM lb_articles WHERE article_url='".$strPost."' OR article_id='".$_GET['id']."' LIMIT 1