<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged null</title>
<link>https://www.question2answer.org/qa/tag/null</link>
<description>Powered by Question2Answer</description>
<item>
<title>PHP Question2Answer MySQL query error 1247: Reference '(null)'</title>
<link>https://www.question2answer.org/qa/17717/php-question2answer-mysql-query-error-1247-reference-null</link>
<description>

&lt;p&gt;
	Tonight I got the following error message (found in error-log-file of my server):
&lt;br&gt;
	
&lt;br&gt;
	[11-Sep-2012 00:29:02] PHP Question2Answer MySQL query error 1247: Reference '(null)' not supported (reference to group function) - Query: UPDATE qa_posts AS x, (SELECT parents.postid, parents.created AS qcreated, COALESCE(MAX(children.created), parents.created) as acreated, COUNT(children.postid) AS acount, parents.netvotes, parents.views FROM qa_posts AS parents LEFT JOIN qa_posts AS children ON parents.postid=children.parentid AND children.type='A' WHERE parents.postid&amp;gt;=388 AND parents.postid&amp;lt;=388 AND LEFT(parents.type, 1)='Q' GROUP BY postid) AS a SET x.hotness=(((TO_DAYS(a.qcreated)-734138)*86400.0+TIME_TO_SEC(a.qcreated))*100 + ((TO_DAYS(a.acreated)-734138)*86400.0+TIME_TO_SEC(a.acreated))*100 + (a.acount+0.0)*16000000 + (a.netvotes+0.0)*16000000 + (a.views+0.0+1)*400000), x.views=x.views+1, x.lastviewip=INET_ATON('79.234.237.160') WHERE x.postid=a.postid
&lt;br&gt;
	&amp;nbsp;
&lt;br&gt;
	
&lt;br&gt;
	What could that be? A bug?
&lt;br&gt;
	
&lt;br&gt;
	Or a hacking attempt?&lt;/p&gt;


&lt;p&gt;
	--&lt;/p&gt;


&lt;p&gt;
	In the mysql query I see postid=388 and parentid=388, so these are the according db-entries:&lt;/p&gt;


&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; style=&quot;border-spacing: 0px; width: 2526px;&quot;&gt;
	&lt;colgroup&gt;
		

&lt;col span=&quot;24&quot;&gt;
		

&lt;col&gt;
		

&lt;col span=&quot;6&quot;&gt;
	&lt;/colgroup&gt;
	

&lt;tbody&gt;
		

&lt;tr&gt;
			

&lt;td style=&quot;height:17px;width:80px; height: 17px;&quot;&gt;
				postid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				type&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				parentid&amp;nbsp;&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				categoryid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				catidpath1&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				catidpath2&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				catidpath3&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				acount&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				amaxvote&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				selchildid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				closedbyid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				userid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				cookieid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				createip&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				lastuserid&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				lastip&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				upvotes&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				downvotes&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				netvotes&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				lastviewip&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				views&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				hotness&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				flagcount&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				format&lt;/td&gt;
			

&lt;td style=&quot;width:127px;&quot;&gt;
				created&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				updated&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				updatetype&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				title&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				content&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				tags&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				notify&lt;/td&gt;
		&lt;/tr&gt;
		

&lt;tr&gt;
			

&lt;td style=&quot;height:102px;width:80px; height: 102px;&quot;&gt;
				388&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				Q&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				2&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				34&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				1340490754&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				1340492965&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				74&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				1,43E+15&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				&amp;nbsp;&lt;/td&gt;
			

&lt;td align=&quot;right&quot; style=&quot;width:127px;&quot;&gt;
				02.04.2012 15:48&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				Wie kürzt man Brüche?&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				Wie kürzt man Brüche? Was muss ich dazu wissen?&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				brüche,bruch,kürzen&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				@&lt;/td&gt;
		&lt;/tr&gt;
		

&lt;tr&gt;
			

&lt;td style=&quot;height:102px;width:80px; height: 102px;&quot;&gt;
				391&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				A&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				388&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				20&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				1437786209&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				&amp;nbsp;&lt;/td&gt;
			

&lt;td align=&quot;right&quot; style=&quot;width:127px;&quot;&gt;
				02.04.2012 16:08&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				indem du zähler und nenner durch dieselbe zahl tei...&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				@&lt;/td&gt;
		&lt;/tr&gt;
		

&lt;tr&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;height:102px;width:80px; height: 102px;&quot;&gt;
				393&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				A&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				388&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				1&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				1340490754&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				1&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				1340490754&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				0&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				html&lt;/td&gt;
			

&lt;td align=&quot;right&quot; rowspan=&quot;2&quot; style=&quot;width:127px;&quot;&gt;
				02.04.2012 16:57&lt;/td&gt;
			

&lt;td align=&quot;center&quot; rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				##########&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				E&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td style=&quot;width:80px;&quot;&gt;
				&amp;lt;p&amp;gt;&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				NULL&lt;/td&gt;
			

&lt;td rowspan=&quot;2&quot; style=&quot;width:80px;&quot;&gt;
				@&lt;/td&gt;
		&lt;/tr&gt;
		

&lt;tr&gt;
			

&lt;td style=&quot;height:85px;width:80px; height: 85px;&quot;&gt;
				&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;strong&amp;gt;Video Brüche: Eine einfache Einführun...&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/17717/php-question2answer-mysql-query-error-1247-reference-null</guid>
<pubDate>Tue, 11 Sep 2012 06:53:27 +0000</pubDate>
</item>
</channel>
</rss>