<![CDATA[ Initial blank value appended to @SELECT Binding - MODX Community Forums]]> https://forums.modx.com/thread/?thread=45031 <![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding?page=2#dis-post-533871 designcouch Oct 30, 2015, 08:54 AM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding?page=2#dis-post-533871 <![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-515579
@SELECT '' AS `name` ,'' AS `id` FROM `[[+PREFIX]]site_content`  UNION SELECT `pagetitle` AS `name`,`id` FROM `[[+PREFIX]]site_content` WHERE `published` = 1 AND `deleted` = 0
]]>
himmdesign Nov 24, 2014, 01:36 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-515579
<![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259350
@SELECT _latin1 '' COLLATE latin1_swedish_ci AS pagetitle, _latin1 '' COLLATE latin1_swedish_ci AS id FROM vid_site_content UNION SELECT pagetitle, id FROM vid_site_content WHERE parent='5' AND published='1' ORDER BY pagetitle ASC;


Again, I’m not a pro at this, so let me know if there’s a reason not to do it this way.]]>
aladage Jun 07, 2010, 11:29 AM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259350
<![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259349 aladage Jun 04, 2010, 02:59 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259349 <![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259348 Any ideas on this? What I don’t understand is, I’m selecting from the same table twice. How could there be two different collations?hmm, found this: http://modxcms.com/forums/index.php/topic,39581.msg239358.html#msg239358
]]>
anonymized-26931 Jun 04, 2010, 02:53 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259348
<![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259347 aladage Jun 04, 2010, 02:40 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259347 <![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259346
@SELECT '' AS pagetitle FROM vid_site_content UNION SELECT pagetitle FROM vid_site_content WHERE parent='5' ORDER BY pagetitle ASC;


The error looks like this:

Execution of a query to the database failed - Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'UNION' »
      SQL: SELECT '' AS pagetitle FROM vid_site_content UNION SELECT pagetitle FROM vid_site_content WHERE parent='5' ORDER BY pagetitle ASC;


Any ideas on this? What I don’t understand is, I’m selecting from the same table twice. How could there be two different collations?]]>
aladage Jun 04, 2010, 02:35 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259346
<![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259345
@SELECT '' AS pagetitle FROM modx_site_content UNION SELECT pagetitle FROM modx_site_content WHERE parent=4

(found it somewhere on the forum)]]>
anonymized-26931 Jun 04, 2010, 12:19 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259345
<![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259344 aladage Jun 04, 2010, 11:25 AM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259344 <![CDATA[Re: Initial blank value appended to @SELECT Binding]]> https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259343
$("select#tvcontainsPatterns\\[\\]").after("<br /><a href='#' id='clear_tvcontainsPatterns[]'>Clear selections</a>");
$("a#clear_tvcontainsPatterns\\[\\]").click(function() {
	$("select#tvcontainsPatterns\\[\\]").children("option:selected").removeAttr("selected");
	return false;
});


It searches for your specified select html and appends a link below it that states "Clear selections". When this link is clicked, it removes the selected attribute from the specifed select’s options.]]>
mstolley Jul 30, 2009, 04:48 PM https://forums.modx.com/thread/45031/initial-blank-value-appended-to-select-binding#dis-post-259343