Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Składnia
teez
post
Post #1





Grupa: Zarejestrowani
Postów: 186
Pomógł: 6
Dołączył: 20.12.2010

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


Witam,

Problem pewnie błahy ale próbowałem już różne kombinacje i ciągle sypie błędami :

Kod
              $id = $this->request['id'];
                $result = $this -> DB -> build(array(
                    'select' => 'COUNT(*) as bid',
                    'from'   => 'pg_komentarze',
                    'where'  => 'bid = '$this->request['id']''
                )
                );


Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in \karta\karta.php on line 35 ( linia z where )

Próbowałem 'where' => 'bid = $id', ''bid' = '$id', 'bid = '.$id.', i dalej nic..


Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Spawnm
post
Post #2





Grupa: Moderatorzy
Postów: 4 069
Pomógł: 497
Dołączył: 11.05.2007
Skąd: Warszawa




Ok, daj 'where' => 'bid = '.$this->request['id']
i binduj dane (IMG:style_emoticons/default/wink.gif)
Go to the top of the page
+Quote Post

Posty w temacie
- teez   [PHP]Składnia   1.04.2013, 13:13:47
- - Spawnm   'where' => 'bid = \'...   1.04.2013, 13:16:19
- - teez   Cytat(Spawnm @ 1.04.2013, 13:16:19 ) ...   1.04.2013, 13:24:41
- - Spawnm   Ok, daj 'where' => 'bid = '....   1.04.2013, 13:32:08
- - teez   Podziękował.   1.04.2013, 13:35:46


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: 23.12.2025 - 16:06