Mysql Upgrade – left joins not working?

If you are getting an error like:

Unknown column ‘i.blah’ in ‘on clause’

using a left join like:

FROM items_table AS items, meta_data_table AS md, categories_table AS cat LEFT JOIN restricted_table AS rst ON items.item_id=rst.item_id WHERE items.title LIKE ‘the%’

switch the order of the from around so that the item MySQL is complaining about is at the end of the from clause. That should fix it in many cases.

How to change quota’s in an openvz ve:

In the root node :

vzctl set NODE_NUMBER –diskspace hard:soft –save

example:

vzctl set 101 –diskinodes 220000:220000 –save

See:

http://wiki.openvz.org/Resource_shortage

Wow, learned how to do something in emacs that I’ve wanted to do for probably 10 years now.

Replace text with newlines. Here’s how:

when in replace mode, press control-q control-j to insert the newline.

I used replace:

<pre>
on><op></op></pre>

with

<pre>
on>control-q control-j<op></op></pre>

it to fix this ugly html:

<pre>
linux rockslinux rocks the casbahlinux is rad
</pre>

with this:

<blockquote><pre>
linux rocks
linux rocks the casbah
linux is rad
</pre></blockquote>

Of course in real life I had about 50 options I would have had to edit by hand to make it all pretty.

Thanks to http://www.cs.umd.edu/~jspacco/emacs.html

Edit:

/etc/selinux/config

change the line:

SELINUX=enforcing

to:

SELINUX=disabled

Reboot to make the change effective.