Wednesday, October 22, 2014

Upload Excel or CSV straight to MySQL DB an online SAAS

If you have data you would like to import to a database like MySQL there is a simple cloud based tool that allows you to upload your CSV file and create a MySQL script which you can paste into phpMyAdmin or any other tool of your preference. This works for not just CSV but also CSV, TSV, XLSX, XML and JSON files. Similarly, not only for MySQL db but also Postgres and MS SQL

CSV, TSV, XLSX, XML and JSON files

https://sqlizer.io/#/

 Thank you, D4 Software Ltd 483 Green Lanes, London, N13 4BS. for this great tool.

Nested select statement for MySQL db

Here is a example of how to create nested sql statement that indicate with a value is in the list.

SELECT distinct userid from IPSOS where userid in (SELECT distinct otxid from Mag0_20141021) and userid in (SELECT distinct id from Mag1_20141021) and userid in (SELECT distinct id from Mag2_20141021) and userid in (SELECT distinct id from Mag3_20141021) and userid not in (SELECT distinct otxid from problem) 

Notice the where in and where not in and how userid gets compared to the out come of the next select statement

Wednesday, June 4, 2014

How Do I Properly Install Zend Framework on Bluehost Server?

1. download latest zend framework 2. unzip and upload to your public_html folder 3. rename it to zf 4. download zend skeleton to test your environment on bluehost. 5. unzip and upload it to public_html folder 6. rename it to zf2-tutorial 7. find file zf2-tutorial\init_autoloader.php 8. right click and edit the file 9. replace the line with $zf2Path = false; //$zf2Path = false; $zf2Path = '/home4/mydomainpathhere/public_html/zf/library'; Your are letting the zend locate the zend framework which you added to zf folder. 10. on the url go to http://yourdomain.com/zf2-tutorial/public/

Friday, May 16, 2014

RESTfull PHP enlightened

How did they do that?

http://wisecrack.ca/this/is/my/rest/id/123

Gives me 404 error since I do not have default file of any kind at directory 123

lighting flash thanks to yrrhelp on youtube
you have to create a .htaccess file on you server and redirect traffic according to its containts!

check out a great video https://www.youtube.com/watch?v=5eWC-lf1FxM

Creating a RESTful Web Service in PHP

Monday, March 17, 2014

View Mac External drive on a PC

Here I am at YVR airport at 1.23am waiting to fly to Singapore with my PC and Mac external passport drive. I have all my movies in this external drive as its connected to my Mac Mini at home to the TV. I was fortunate to find a blog explaining how to view files from a Mac formated drive.

Download http://www.catacombae.org/hfsx.html HFSexplorer. Thats it! Absolutely fantastic. Since my second name is Trouble, I usual encounter a run around to able to get anything working. Like my popular Calendar Lighting importing Outlook exchange calendar. That was some doing. But this HFSexplorer, easy as pie thanks to all the developers.

Thursday, March 13, 2014

How to download a file from server using SSH Linux?

scp /path/to/local/file username@hostname:/path/to/remote/file
Copy something from some system to some other system:
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file

Copy something from another system to this system:
scp username@hostname:/path/to/remote/file /path/to/local/file