![]() |
![]() |
![]()
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.. |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 4 069 Pomógł: 497 Dołączył: 11.05.2007 Skąd: Warszawa ![]() |
'where' => 'bid = \'$this->request[\'id\']\''
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 186 Pomógł: 6 Dołączył: 20.12.2010 Ostrzeżenie: (0%) ![]() ![]() |
'where' => 'bid = \'$this->request[\'id\']\'' mySQL query error: SELECT COUNT(*) as bid FROM ibf2_pg_komentarze WHERE bid = '$this->request['id']' Error: 1064 - 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 'id']'' at line 1 'where' => 'bid' = $this->request['id'] Parse error: syntax error, unexpected '=', expecting ')' in C:\xampp\htdocs\f\admin\applications_addon\other\panelgracza\modules_public\karta\karta.php on line 35 Ten post edytował teez 1.04.2013, 13:26:09 |
|
|
![]()
Post
#4
|
|
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) |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 186 Pomógł: 6 Dołączył: 20.12.2010 Ostrzeżenie: (0%) ![]() ![]() |
Podziękował. (IMG:style_emoticons/default/smile.gif)
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 20:55 |