![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 19 Pomógł: 0 Dołączył: 4.11.2006 Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Kod if($_GET['article_id']) { $data = dbarray(dbquery("SELECT article_cat FROM ".$db_prefix."articles WHERE article_id=".$_GET['article_id']."")); opentable("Artykuly"); $rows = dbcount("(article_id)", "articles", "article_cat=".$data['article_cat'].""); if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; if ($rows != 0) { $result = dbquery("SELECT * FROM ".$db_prefix."articles WHERE article_cat=".$data['article_cat']." ORDER BY ".$cdata['article_cat_sorting'].""); $numrows = dbrows($result); $i = 1; while ($data = dbarray($result)) { if ($data['article_datestamp']+604800 > time()+($settings['timeoffset']*3600)) { $new = " <span class='small'>[".$locale['402']."]</span>"; } else { $new = ""; } echo "<a href='".seoname($data['article_subject'])."-r".$data['article_id'].".htm'> ".$data['article_subject']."</a>$new<br>\n".stripslashes($data['article_snippet']); echo ($i != $numrows ? "<br><br>\n" : "\n"); $i++; } closetable(); } } Po wstawieniu w/w kodu dostaje niemiłą odpowiedź: Cytat You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Kombinowałem z tym cudzysłowem bardzo, ale poddaje się, mógłby ktoś pomóc? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 675 Pomógł: 15 Dołączył: 7.11.2004 Skąd: Katowice Ostrzeżenie: (0%) ![]() ![]() |
Kombinowałem z tym cudzysłowem bardzo, ale poddaje się... Z jakim cudzysłowem? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) Zanim wykonasz zapytanie, wyświetl je - wtedy łatwiej jest znaleźć błąd: I zrób tak ze wszystkimi zapytaniami zwracającymi błąd. Następnie przedstaw na forum owe zapytania. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 21.09.2025 - 22:30 |