Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
sql query?!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 26.12.2005 18:31    Post subject: sql query?! Add user to your forum ignore list Reply with quote

Evo malo se igram s PHP-om i sql-om i tak..

uglavnom zapeo sam na ovome:
SQL query je:
Code:
INSERT INTO content (id,naslov,uvodnitext,punitext,status,sectionid,catid,createdby,images,order,pristup) VALUES (1,Test!,Uvodni tekst!,Puuni tekst neki!,0,0,0,2,none,1,0)


javlja ovu gresku:
Code:
 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 'order,pristup) VALUES (1,Test!,Uvodni tekst!,Puuni tekst neki!,0



nikak da skuzim u cemu je bed?

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 26.12.2005 18:39    Post subject: Add user to your forum ignore list Reply with quote

ista stvar je i ako vrijednosti stavim u jednostruke navodnije, samo onda mi javi ovakvu gresku:
Code:
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 'order,pristup) VALUES ('1','Test!','Uvodni tekst!','Puuni tekst ne

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
retro_one



Joined: 16 Sep 2003
Posts: 880
Location: DUBRAVA.

PostPosted: 26.12.2005 19:40    Post subject: Add user to your forum ignore list Reply with quote

numericke vrijednosti ne trebas stavljati u navodnike...a ostalo bi ja probao bubnuti u dvostruke navodnike....meni tak fercera

_________________
Just your average eccentric programmer.
Back to top
View user's profile Send private message
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 26.12.2005 19:45    Post subject: Add user to your forum ignore list Reply with quote

sad sam skuzio... polje mi se zvalo order, kad sam mu promjenio ime u rapsored sve je profunkcioniralo, pretpostavljam da je "order" rezervirana rijec neka u sql-u pa zato nije sljakalo?!?!


bo...

inace nestavljam u navodnike, ali sve sam probo zbog ovog primjera Smile


pozdrav, hvala

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 26.12.2005 22:42    Post subject: Add user to your forum ignore list Reply with quote

Imaš pravo, SQL se guši na rezerviranim rječima baš na ovakvim query-ima, a ne-numeričke vrijednosti escape-aj (mysql_escape_string brijem) i stavi u jednostruke navodnike
Back to top
View user's profile Send private message Send e-mail Visit poster's website
imbrod
Guest





PostPosted: 02.01.2006 15:56    Post subject: Reply with quote

tic984 wrote:
sad sam skuzio... polje mi se zvalo order, kad sam mu promjenio ime u rapsored sve je profunkcioniralo, pretpostavljam da je "order" rezervirana rijec neka u sql-u pa zato nije sljakalo?!?!


bo...

inace nestavljam u navodnike, ali sve sam probo zbog ovog primjera Smile


pozdrav, hvala



ORDER je definitivno jedna od najvaznijih kljucnih rijeci u SQLu
Meni recimo 'status' ne prihvaca u MS Accessu, pa sam ga preimenovao u status1.
Back to top
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 02.01.2006 18:07    Post subject: Add user to your forum ignore list Reply with quote

Bez veze je što ti baze daju da kreiraš takva polja i onda ne daju da ih query-aš Sad
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group