You are here: Re: How do I fetch an array of all field names in a mysql database? « All PHP « IT news, forums, messages
Re: How do I fetch an array of all field names in a mysql database?

Posted by robert on 05/26/06 18:18

<snip>

| >first, my example is in keeping with the op's methodology...so that he
| >"get's it" through comparison.
|
| I don't agree with you that it's a good idea to post poor code to help
| someone "get's (sic) it."

again, show me *how* the code was poor.

| >second, how is my code "wrong x 3"?
|
| Well, instead of posting responses to all your rants about what you call
| my bad programming and methodology I thought I'd roll them into one.

which means what? i have 3 bad programming methods in the code i wrote? you
sure a vague fellow...makes you seem like you're stretching a bit without
much effect.

| >third, where are the "magic numbers"? $i is an index counter and is
REQUIRED
| >by mysql_fetch_field.
|
| Did I say anything about $i?

well, again in your vagueness, $i is the ONLY opportunity to be had in the
example i gave for something REMOTELY magical to be infered. since that WAS
you point in your post, why not just tell me where the magic comes into play
in that code.

| >forth, your "IMO" solution is exactly "IMO". even still, you should
| >formalize your writing so that the "while" has loop body brakets. any arg
| >you make against that will be met with some doozy code i'd like you to
| >interpret that uses your style...like quadruple, single line nested
| >for/foreach's amongst multinested if's.
|
| Perhaps you misunderstood the simple example I posted.
|
| But if you post some of your "doozy [sic] code" here I may tidy it up
| for you if I have time.

i understand it just fine...i don't have a problem with it other than your
choice of formatting. it is more clearly understood as:

while (condition)
{
}

finally, i doubt you *could* clean anything up...and i've already handled
the programmer that wrote the crap. the very fact that someone would have to
be an interpreter while reading your style of body formatting is the very
reason it IS bad formatting. it is more difficult to maintain...esp. when
your project involves multiple developers with varying skill levels. then
again, i doubt you are a professional or are in that kind of dev.
environment...the PAID kind.

| >fifth, not all db's HAVE a "DESCRIBE" keyword or functionality...i write
| >from experience so that when i say "select * from table where 1 = 2", i
know
| >it will return results - mysql or not.
|
| Not all databases have the SHOW keyword or functionality, so what's your
| point?

the point is being flexible. ALL db's will give me a list of fields with no
associated data using "select * from table where 1 = 2". your "IMO" post's
brevity RELIES on the DESCRIBE/SHOW keywords. you are setting yourself up to
redo your work when your boss says "we're going to go to terdata instead of
oracle".

i'm not suprised you missed that point since you so frequently miss the
op's.

| >sixth, i post code that answers questions instead of berating people with
| >things like this response: "1 - 1 = 0 :^)"...then again, you are (as
noted
| >before and maintained now) as useful as a wort...just not as smart!
|
| I answered the question without berating anyone. The question was:
|
| "...date("m")-1 returns the previous month.
|
| But, if the current month is "01", will this return "12" or "00" ?"
|
| and my answer was:
|
| "'0' would be returned (1 - 1)."

you left out the happy face too...a smug indication that was a disrespectful
jest offered in response to a sincere question. since you didn't even offer
a suggestion of any other kind (as myself and 4 others did) in regard to
date math, your jest only seems that much more inappropriate...and you even
less credible.


| I don't consider this answer to be any less useful than your "you start
| by RTFM" reply to message
| <1148469014.190473.71330@i40g2000cwc.googlegroups.com>.

i don't babysit. if it is a question whos answer is so prevelant that it is
all over the web and in manuals with example code galore, we all can tell
the op is being LAZY in addition to being a noob. the latter is completely
acceptable while the former simply chaps almost everyone's ass.

see a difference? had the op said, "i'm having problems with my code
uploading files to my server", they'd have gotten a completely different
response from me...while i suspect yours would have been another joke -
intentional or not.

| >now, if you'd like to show me some examples of my "bloated" code, go
| >ahead...i'm festidious when it comes to maintenance and brevity of code,
so
| >i'll be waiting. it would also be in your favor to post *your* own code
that
| >shows the reduction of bloat and accomplishes the same task as the code
you
| >are berating.
|
| Haven't we just done that? Didn't you read the message your responded
| to?

no, we haven't...i've posted hoards of code. you're telling me that of all
the code i've given, THAT was the one you consider bloated? doesn't make
sense, since your initial flame to me said "Like many examples you post
here, your code is bloated, overly complicated, and poor." MANY would
indicate more than just THIS post.

either get your story straight or do as i ask...show me bloated code and
your version that fixes it without comprimising the task(s) each attends.

i already described above how you "IMO" code doesn't scale even though it is
brief...but take your pick of which is most important. i'm paid to know the
difference. your pick seems a bit more of a guess. here's a hint...bloat !=
number of lines written. ok, not into hints? bloat == writing a solution in
a complex manner when a more simple approach could have been had. and in
that light, neither the example i gave nor the example you gave are
bloated...however, mine will scale without having to be reprogrammed.

| >until then, m.j., FOAD
|
| That seems to have been your attitude to me for a while now. I don't
| know why.

glad you noticed. you should also be painfully aware that such attention is
only directed at you. i'd be about finding out why if our roles were
reversed. for starters, you are simply not helpful. more importantly is
that, in your non-helpfulness, you are condescending to those with questions
here. even worse is the proliferation of your responses here. all you've
proven with any of this is that you are...lol...not helpful, condescending,
and reply to posts a lot.

distain is at least more specifically narrowed!

 

Navigation:

[Reply to this 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

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