Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MYSQL] Zapytanie
sebszu
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 6.05.2008

Ostrzeżenie: (0%)
-----


Witam.
Nie potrafię dostrzec błędu w tym kodzie a MySQL wywala błąd składniowy. Prosze o pomoc (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

CODE
$query_rs_countblogs = "select * from ".$table_prefix."posts where post_category=".$row_rs_category['term_ID'];
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 3)
czachor
post
Post #2





Grupa: Zarejestrowani
Postów: 897
Pomógł: 40
Dołączył: 16.12.2003
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


A dokładnie jaki błąd? Spróbuj ew.
  1. ...WHERE post_category='".$row_rs_category['term_ID'] . "'";


Ten post edytował czachor 21.05.2008, 14:30:03
Go to the top of the page
+Quote Post
sebszu
post
Post #3





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 6.05.2008

Ostrzeżenie: (0%)
-----


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 1
Go to the top of the page
+Quote Post
marcio
post
Post #4





Grupa: Zarejestrowani
Postów: 2 291
Pomógł: 156
Dołączył: 23.09.2007
Skąd: ITALY-MILAN

Ostrzeżenie: (10%)
X----


Kod
$query_rs_countblogs = ('select * from '.$table_prefix.' posts where post_category = "'.$row_rs_category['term_ID'].'"');


Usun sobie spacje kolo posts bo nie wiem czy ona ma byc czy niee

Ten post edytował marcio 21.05.2008, 14:46:23
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 22.08.2025 - 12:37