Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #9533
| Message-ID | <456437807.dArH623vQ9@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-05-22 23:05 +0200 |
| 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> |
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
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