Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php][mysql] cudzysłów?
nker
post 5.07.2007, 09:27:59
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? smile.gif
Go to the top of the page
+Quote Post

Posty w temacie
- nker   [php][mysql] cudzysłów?   5.07.2007, 09:27:59
- - JaRoPHP   Cytat(nker @ 5.07.2007, 08:27:59 ) Ko...   5.07.2007, 11:43:05


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 08:54