Posted on January 10th, 2012 by admin
Filed under MySQL |
Recently working on a project I discovered and learnt something new so I thought I would share it amongst everyone.
I had to replace data from one column of a database table to the other database table overwriting it’s column data. The key also was it’s optimisation as I was dealing with 10,000 products. So anyone intending to use it for tables holding big data this may help!
Here is the query:
UPDATE table1 AS t1
INNER JOIN
(SELECT item_code, image FROM table2 WHERE some_type=’name’) AS t2
ON (t2.item_code=t1.item_code)
SET t1.image = t2.image
As simple as that.
Steve Perkins
Posted on August 2nd, 2011 by admin
Filed under Wordpress |
Within the Wordpress head tags it can be quite messy. So here is some code to get rid of unwanted tags within the HTML
tag.
Posted on October 26th, 2010 by admin
Filed under Articles |
Hi to all that have an iPhone 4 running iOS 4.1 or who are planning to buy one We recently discovered a security flaw with the iPhone 4 despite having a lock code. This is a major security issue, which allows you to access the contacts section without having to unlock the 4 digit lock [...]
Posted on December 7th, 2009 by admin
Filed under Articles |
Another new website for the month; Blue Elephant in Telford is a new Contemporary Indian Cuisine in Telford. The beauty about this website is that it’s connected to our Admin Control Panel making it a Content Management System (CMS). The deadline for this website was 29/11/2009 but the Viable Web Design team had this finished [...]
Posted on December 7th, 2009 by admin
Filed under Articles |
Another new website for the month; Spice Lounge in Telford is amongst the top Telford Indian Restaurant. The beauty about this website is that it’s connected to our Admin Control Panel making it a Content Management System (CMS). The deadline for this website was 01/12/2009 but the Viable Web Design team had this finished on [...]
Posted on December 7th, 2009 by admin
Filed under Articles |
Our dedicated team of website designers / website developers have created a new website for 2nd City Driving School in Birmingham, West Midlands. All our work is agreed to the user specification and the 2nd City staff were really impressed with the JQuery pulldown and the way certain functionality of the website was achieved. We [...]
Posted on December 6th, 2009 by admin
Filed under PHP, Tutorials |
Now that we know how to convert a formatted date in PHP to timestamp. Let’s move on to compare two dates. At my workplace I came across and instance where I had to check the posted date wasn’t less than today’s date, so let’s put this in picture so you know the concept behind date [...]
Posted on December 5th, 2009 by admin
Filed under PHP, Tutorials |
Whether you are posting a date or a passing variable that is a formatted date you can use the function below to convert it into a timestamp function convert_timestamp($delimeter,$date){ $explode_date = explode($delimeter,$date); $new_date = mktime(0,0,0,$explode_date[1],$explode_date[0],$explode_date[2]); return $new_date; } Now to test the function we have created is shown below. $date = “01/12/2009″; $delimeter = “/”; [...]