Reply to Re: mySQL Problem

Your name:

Reply:


Posted by The Natural Philosopher on 11/08/07 17:29

Steve wrote:
> "lawrence k" <lkrubner@geocities.com> wrote in message
> news:1194496438.926297.74650@o38g2000hse.googlegroups.com...
>> 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.
>
> that's bullshit. i don't care what people prefer when they decide to
> formalize their style of programming. what i get incensed about is when no
> measure of formality is considered good practice. as for 'mere matters of
> taste', you simply missed the boat on the subject at hand...NO FORMATTING
> vs. ANY formatting.
>
>
The trouble with standards is here are som nay to choose from..



$query="select name, id from employees order by name";

Nowt wrong with that is there?

Now consider

$query =sprintf( "select name, id, number, picture, phone, email from
employees where id= (select employee_id date from sacked where name
like %s%% order by sacked.date )",$badboys);

and it starts to get messier..
You don't slavishly follow rules..unless you are a jerk, or working for
one.....

"Its is a company coding policy that any subroutine or multi-use stub of
code in assembler be preceded by a minimum 5 lines of header comment
describing what the function does and how it affects global variables if
any and a miniumum of a comment per 2 lines of code to describe waht is
being achived bty the lines"

FUNC_EXIT:
;*********************************************
;*This s a stub of code
;*it is here to save ROM space.
;*It simply takes one 3 byte JMP to replace 5 bytes of
;*instruction that every C compatible subroutine has in it
;*There you bastards thats your 5 lines.
;********************************************

MOV DX,SP ; restore stack to entry point
POP DX ; restore DX to previous frame pointer
POP CX
POP BX ; restore temp registers.
RET



;-)

[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

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