Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #9533

Re: cause of error is what?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="UTF-8"
Message-ID <456437807.dArH623vQ9@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <php@PointedEars.de>
Organization PointedEars Software (PES)
Date Wed, 22 May 2013 23:05:50 +0200
User-Agent KNode/4.10.2
Content-Transfer-Encoding 8Bit
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Subject Re: cause of error is what?
Newsgroups comp.lang.php
References <j3e3kkp57qb7$.ejqn5joyml1q$.dlg@40tude.net> <knhhna$61c$1@dont-email.me> <3757310.uHaZ80sULO@PointedEars.de> <knidp9$770$1@dont-email.me>
MIME-Version 1.0
Lines 71
NNTP-Posting-Date 22 May 2013 23:06:49 CEST
NNTP-Posting-Host 51a50a32.newsspool4.arcor-online.net
X-Trace DXC=l5<j_7VS<B@=8m7nZkdN^@4IUK<Cl32<A4Fo<]lROoRA8kF<OcfhCOKLf0HJ8I\J]NDZm8W4\YJNLb@mF9jNikdEBoKGPB=12AGmX9P^2nC94K
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.php:9533

Show key headers only | View raw


Scott Johnson wrote:

> On 5/22/2013 3:25 AM, Thomas 'PointedEars' Lahn wrote:
>> Scott Johnson wrote:
>>> On 5/21/2013 6:44 PM, richard wrote:
>>>> $result = mysql_query("SELECT atitle,artist,avid FROM A$year WHERE id =
>>>> $number");
>>>> if (!$result) { echo 'Could not run query: ' . mysql_error();  exit; }
>>>> $vid = mysql_fetch_row($result);
>>>>
>>>> echo $vid[0];
>>>>
>>>> }
>>>>
>>>> echo "</div>";
>>>>
>>>> ?>
>>>>
>>>
>>> *JTOL*
>>
>> -v

So, what does “JTOL” mean?

>>> I could be wrong but..
>>
>> You are.  RTFMs.
>>
>> […]
>> <http://php.net/mysql_query>
>> […]
>> <http://dev.mysql.com/doc/refman/5.6/en/type-conversion.html> p.
> 
> First off I have never been rude to you or anyone in this group so no
> idea why you feel you need to 'RTFM' to me, but if you have to then you
> have to.

<http://www.catb.org/~esr/faqs/smart-questions.html#not_losing>

And please quote only the relevant parts.  Time and space are precious 
goods.

> My original thought/idea was that if 'id' was an (int) in the Db then
> sending an empty value should not of caused a query error.  But on
> elaborating on the thought, there is much more to it when not having
> $number set aside from the basic query.  Stuff as simple as column set
> to not accept NULL values, etc..

I do not follow.  MySQL will never see a NULL value in this case.  It will 
see *no* value at all, causing a MySQL syntax error.

> It was just a quick un-thought out thought (yes the existence of
> un-thought can be argued), nothing more, nothing less.

Well, I for one try to test my assumptions before I post them, thereby not 
wasting other people's time with such thoughts.  Many things are 
conceivable; few are well-founded.

> Thanks however for expanding on the thought so as not to confuse anyone
> reading it.

You're welcome, I think.


PointedEars
-- 
Sometimes, what you learn is wrong. If those wrong ideas are close to the 
root of the knowledge tree you build on a particular subject, pruning the 
bad branches can sometimes cause the whole tree to collapse.
  -- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

cause of error is what? richard <noreply@example.com> - 2013-05-21 21:44 -0400
  Re: cause of error is what? richard <noreply@example.com> - 2013-05-21 21:54 -0400
    Re: cause of error is what? David Robley <me@home.invalid> - 2013-05-22 12:05 +0930
  Re: cause of error is what? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-21 21:35 -0700
    Re: cause of error is what? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-22 12:25 +0200
      Re: cause of error is what? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-22 05:34 -0700
        Re: cause of error is what? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-22 05:48 -0700
        Re: cause of error is what? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-22 23:05 +0200
    Re: cause of error is what? richard <noreply@example.com> - 2013-05-22 13:03 -0400
      Re: cause of error is what? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-22 16:42 -0700
        Re: cause of error is what? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2013-05-23 00:21 +0000
          Re: cause of error is what? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-23 05:42 -0700
            Re: cause of error is what? Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-23 16:02 +0000
              Re: cause of error is what? Scott Johnson <noonehome@chalupasworld.com> - 2013-05-23 15:33 -0700

csiph-web