Reply to Re: mySQL Problem

Your name:

Reply:


Posted by Darko on 11/08/07 14:35

On Nov 8, 5:33 am, lawrence k <lkrub...@geocities.com> wrote:
> On Nov 7, 12:19 pm, "Steve" <no....@example.com> wrote:
>
>
>
> > "Einstein30000" <dominic_er...@web.de> wrote in message
>
> >news:1194453026.587359.180320@19g2000hsx.googlegroups.com...
>
> > > Hi,
>
> > > in one of my php-scripts is the following query (with an already open
> > > db-connection):
>
> > > $q = "INSERT INTO main (name, img, descr, from, size, format, cat,
> > > host, link, date) VALUES ('$name', '$img', '$descr', '$user', '$size',
> > > '$format', '$cat', '$host', '$link', '$date')" or die(mysql_error());
>
> > > And when the query gets executed i get back the following error:
>
> > > 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 'from, size, format, cat, host, link, date) VALUES ('bla', '-',
> > > 'keine', 'Holgi',' at line 1
>
> > > Whats wrong here?!
>
> > your sql statement is F.U.C.K.E.D !!! hmmmm...perhaps you'll now see the
> > value in FORMATTING your queries where a HUMAN BEING can read it. makes it
> > easier to debug. :)
>
> Programmers will always disagree about how to style their code. Which
> is better, camelCase or under_scored variable names? People get into
> holy wars over this stuff. A great deal of energy is wasted on issues
> that, in the end, are mere matters of taste.

I didn't disagree with Steve on formatting issue. I merely said that
it wasn't
crucial to see where the error was, and I also said that it isn't such
a big
deal if someone names a variable/column with a reserved word, since it
can happen
to anyone.

As for formatting, of course, I can't stand it when I see the lack of
it, and I always
correct it on the fly while reading a piece of code. As do most
programmers here,
I believe (I hope).

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация