Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [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 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
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


--------------------
how many SEO experts does it take to change a light bulb,lightbulb,light,bulb,lamp,lighting,switch,sex,xxx
5-Reasons-why-you-should-NEVER-fix-a-computer-for-free
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


--------------------
Zainteresowania: XML | PHP | MY(SQL)| C# for .NET | PYTHON
http://code.google.com/p/form-builider/
Moj blog
Go to the top of the page
+Quote Post

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 Aktualny czas: 20.08.2025 - 10:28