Thursday, 31 May 2012

mysql blank field not returning as null

i seem to be having a problem checking to see if a column is NULL or not .  I know the results are empty however

FROM employee_info
WHERE employee_first_name IS NULL;

isn't returning the results I want.

Let's try and rethink the search terms I'm using.

I searched for

mysql how to find fields that are empty

Here's my next seaches:

mysql blank field not returning as null

mysql field empty but not returning as null

and this is what I got from this post

SELECT * FROM employee_info WHERE employee_first_name = '';

so if you wanted to check for all rows that did have something in the 'employee_first_name' field you could use.

SELECT * FROM employee_info WHERE employee_first_name > '';

Wednesday, 30 May 2012

Using a Heart Internet Dedicated Server for the 1st Time

We've just set up a dedicated server with HeartInternet and to be honest I'm a bit confused as to know where to start.  So here's some notes on the information I've found to read on Heart Internet so far.

Pages to read

If you have cPanel installed on your dedicated server, you can view a website on your server using a temporary URL as follows:



This seems straight forward AND IS A GOOD PLACE TO START

this post just says it'll take an hour to set up.

this post tell us what installed on the server at setup.

Friday, 25 May 2012

blackberry 9900 deletes my email after so many minutes

How do I fix this problem... The blackberry 9900 deletes my emails a few minutes after I read them . > click on the 'messages' icon > click 'Email Account Management' > scroll down to 'synchronisation options' > un tick 'deleted items'

Thursday, 24 May 2012

Transferring a database from a .mdf file or from SQL Server to a new Mysql database.

Transferring a database from a .mdf file or from SQL Server to a new Mysql database.

I've been fighting with this issue for the last few hours.

We have a server that has been set up by someone else and what I need to do is import the tables  from this server onto my new server.

The easiest way would be to use phpmyadmin - however it neither seems to be installed and  installation on phpmyadmin would probably take hours as the server is VERY slow.  Which is one of  the reasons why I need to change to the new database.  Additional the server would probably need  extra things installed like GD to get phpmyadmin to work.

The next thing I tried to do was look to see if there where any files in SQL Server that are data files I  could grab and export into a new database.  The solution I found in the end is much simpler - and that  is because I already know the username and password for the database I could write a script that  would take the information off.

NO NEED TO WRITE THE SCRIPT as this blog has it for me  BACKUP mysql using PHP script

This script worked a treat - the only change is that you need to add the database name in the function arguements. ;)

Add additional text when someone Copies and Pastes text from your Website

I just noticed a pretty cool trick while I was taking off some text for http://wiki.answers.comSo I did a search for these terms

how do you add the readmore text to your copy and pasting from this site

add addtional text when someone copies text from your website.

The first few answers I found all use Tynt.  However I wasn't happy using the code from this site on my webpages.  And then I found this post How to add text through Copy and Paste from a website

Which works a treat :)

Wednesday, 23 May 2012

Google listing one with me as author the other without whats the difference

Last month I made attempts to  Link my Google Listings with my Google+ Account .  And have had varying results.

After making a search for Transfer a website using SSH - I saw to of my listings - One with 'by DJ Millward' attached and the other without

The thing is there's no difference between these pages as to give me a clue on how I can get ALL my google listings to have my google+ link attached.

Here's the code thats in both pages.

And the blog is listed in my 'Edit Profile' > 'Contributor to'


Monday, 21 May 2012

Importing Data from an old database into Joomla Community Builder Problem.

Importing Data from an old database into Joomla

Community Builder Problem.

I'm currently working on a project where I'm needing to transfer over users to being Joomla Community Builder users.

the only problem being that the comprofiler was updating.

The fix was to make the id column primary, unique and auto increment.

I turned the changes back afterwards though just incase it has an adverse effect somewhere else.

Wednesday, 16 May 2012

PHP / Mysql methods of converting timestamp to DATE

php converting timestamp to DATE

$datetime = date("Y-m-d H:i:s", $timestamp);


using FROM_UNIXTIME will do it for you inside the mysql query itself.

take a look at this code

SELECT userId, url, FROM_UNIXTIME(epoch) FROM mytable

In my situation the Date in the Mysql was in DATE format and I wanted the result returned back to me in a UNIX timestamp  

Here's the query I used

$query = "SELECT UNIX_TIMESTAMP(shift_date) as shift_date FROM  `legacy_shifts` ";

Tuesday, 15 May 2012

Joomla GK4 - show an image in slideshow but not in the article

Joomla GK4 - show an image in slideshow but not in the article

Monday, 14 May 2012

Should I move my Joomla 2.5 installations mysql tables from myISAM to InnoDB

Another programmer who was looking at my code was horrified to see that my Joomla 2.5 website was using myISAM table format in my MySQL tables.  This is default but should I be bothered.  Well running fast and stable myqsl queries is very important to the program I am creating.  So if doing so is an improvement that it's certainly something I should look at doing.

Take a look at this blog. Should you move from MyISAM in InnoDB

So the next question is 'what do I need to do to upgrade my Joomla 2.5 installation from MyISAM to InnoDB


ALTER TABLE table_name ENGINE=innodb


I'll let you know any difficulties when they occur.

WiseMonkeyMedia - Adding A Client

here's some notes on Adding a Client to , which is Joomla 1.7 installation.

This is the process that needs to be followed.  I'd put it as a INTERMEDIATE thing to be able to do.  For example yoy should be able to confidently add articles and find your way around Modules etc. A video of this process will follow shortly.

Adding A Client

* add the category in Article Manager

* add the menu item

* add menu to 'our client' module

* make a article

* Article ID add to module

* Duplicate a Slide show.

Friday, 11 May 2012

Joomla 2.5 frontend login not working but administrator on migration

this seems to be a common problem with a joomla 2.5 migration

joomla frontend login not working after joomla 2.5 migration

joomla 2.5 frontend login not working after migration

joomla 2.5 changing mysqli to mysql broke my frontpage login

joomla 2.5 frontend login Your registration process is not yet complete message

Then it occured to me that I had Community Builder installed and this could be a link.  Which lead me to looking for this. 

joomla CB frontend login Your registration process is not yet complete message

This is as close to an answer that I got.

In my case I'd realised I'd deleted some information about the user from the table 'comprofiler' - once reinstated I was up and working again. 

Joomla Migration to 2.5 stuck at "checking and cleaning"

Using JUpgrade to move a Joomla 1.5 installation to 2. 5 it was getting stuck.  Here's what I needed to do

> create a JUpgrade Folder and give it 755 chmod

> download the latest Joomla Package and unzip into that folder

> run JUpgrade but bypass the creating directory and download features in the settings.

Here's the post where I found this answer on

Thursday, 3 May 2012

Joomla Virtuemart - The image URLs submitted seem to be blocked by robots.txt

I got this mesage in Google Base

Roboted images (113 items)
The image URLs submitted seem to be blocked by robots.txt. Google will not be able to display these images together with the products. Please change your robots.txt file to allow Google to download the image.

I am working on a Virtuemart Joomla installation and I think it could either be from

Disallow: /components/
Disallow: /images/

To check this I've search for

' is Disallow: /components/ blocking image for google '

' joomla virtuemart image blocked from google merchant '

and found the answer in this forum
Red Mystic Forum

that its the  Disallow: /components/ 

however I am going to remove the Disallow: /images/ as well, as I would like this site to be findable in Google images .  In fact I will check that all my Joomla sites are searchable in Google Images. 

Tuesday, 1 May 2012

get rid of virtuemart Error Login denied! Your account has either been blocked or you have not activated it yet. Did you not get an activation e-mail and follow the validation link?

When browsing round my clothing store website I've started to see this message

Error Login denied! Your account has either been blocked or you have not activated it yet. Did you not get an activation e-mail and follow the validation link?

So what's the deal.  Well I checked the site in another couple of browsers and it isn't appearing there.

After that I deleted my cookies and hey presto! the problem is gone.  So it seems it's only an issue after I'd logged in.  Which I can live with.

This may not be the same in you case but it's worth checking ;)