Month: January 2015

Installing PHP5 and Apache2 in Ubuntu 14.04

Unlucky Linux

Most of the time, I face problem in installing Apache2 in Ubuntu 14.04. I do google and google and eventually I can set up the Apache2 server. So, I think I should start blogging about Web server.

Install Apache

Then go to: http://localhost , you will see a page of Apache2.

Install PHP

Install MySQL

Install PHPMyAdmin

Server Tweak

Installation is nearly complete. Now we have to tweak some settings so that we can edit and create file at webroot easily.

Open up terminal, Run this command:

Okay! You can see this lines:

Our document root is pointed to /var/www/html, but here we can’t edit file without sudo access, So to ease the process of developing we need to change the document root!

So, Change the Document root!

Ok, We need to restart the server to take the change affected.

Open .
Wait! What!

F**king access denied? Holy…

View original post 104 more words

Raw MySQL and PHP for Windows 8 and IIS

Blue Jay SQL

This is a tutorial on how to install PHP and MySQL onto Windows 8.1 using IIS for development purposes, and without using additional software platforms like XAMPP, ZendServer, or EasyPHP etc or using tools like Microsoft’s Web Platform Installer. I’ve skimmed through over a dozen books on PHP & MySQL, and none of them show you how to install them, mostly because it’s not the typical approach given the tedious configuration.

Step 1. Download and install Microsoft Visual C++ 2012 Redistributable Package (x86) from:

Step 2. Download and install the MySQL Community Server MSI file from:

Step 3. Download the non-thread-safe PHP zip file from:

Extract all the contents into its own folder e.g. C:php
Add the PHP installation path to your Environment Variables path (do not forget to prefix it with a semicolon).
You get there by right-clicking your PC icon in Windows Explorer, click Properties, and under…

View original post 884 more words

MYSQL Basics


Data Optimization

1. Primary Key / Foreign Key
—Containing unique , non null key
—Each records can be uniquly identified
—Index on Primary Key
—Employee Id in Employee Table
—UAN Number
—Adhar Card Number

—Column that is the primary key of another table
—EmployeeId in Library Management

2. Normal Forms

—Removing of redundent columns
—Small record size is better
—Third normal form is used in the real world
—skinny tables == Faster Queries

    —First Normal Form
–No Repeating fields.
–If we add same type of fields in one table.

    —Second Normal Form
–First Normal Form
–No attribute associated with partial key column

    —Third Normal Form
–First Normal Form
–Second Normal Form
–All attributes(non key elements) must be directly associated with the primary key.

–Joins will be faster.

3. Primary / Foreign constraints



View original post 1,036 more words

A neat MySQL hack to create a VIEW with subquery in the FROM clause…

Gruff's Tech Tips

I’ve grown to love MySQL, but every now and then it has some strange restriction that temporarily stumps me. Then I discover a marvelous workaround and fall in love with it all over again.

This hack lets you overcome the restriction that you’re not allowed to have a subquery in FROM clause of a VIEW.  The trick is to refactor the subquery into a view of its own, which you can then join to in the VIEW you want!  The subquery is likely to be something you’ll re-use anyway, so this is doubly useful.

Here’s a worked example.

I’m working with some currency information for products that is (unfortunately) denormalised into columns instead of being Boyce-Codd normal form.  You see this a lot in databases as it can make front-end code easier, but it makes it hard to work with in SQL.

It looks like this:

denormalised prices

I’ve renamed and simplified tables and columns here to make the example…

View original post 347 more words

SharePoint – Query String Parameters


In your development project you might need at some point in time to create a Query String Parameter.

But there are some challenges if you want to pass this to a Form Variable !

Here we go :

1. Create a Query String Parameter any string is fine.  and construct your URL.

2. Create a JQuery function for the receiving party.

In this case we will use the parameter to filter a Data View Web Part. So add the script in the receiving Form to intercept is and pass it on to a Data View Parameter

3. Create the DVWP Parameter

In SharePoint Designer create a new Parameter


We call it as well HeaderID and refer to the Query String Parameter called HeaderID.



This does NOT work for a Item Display Form a DVWP ?

Solution is to add this in the standard DISPLAY form NOT…

View original post 98 more words

SharePoint – Convert Drop Down Box in a New Item Form to Text Box.


It is possible to Convert drop down box in a NEW form to Text Box.

Even if the list field type remains a Dropdown Box.

This can only be achieved if in a CUSTOM List Form ! Not on a standard List Form created from the menu.

1. Create a Custom Form


2. Next Convert the field


Change the dropdown to a Text Box now we can.


3. Set the value on load.

Now you can set the field value using a Query String Parameter value.

See the code is slightly edited by replacing the variables

text=”{@Sample_Header}”  to text=”{$HeaderID}

This is not possible if we use the original Dropdown field (at least in an easy way).

View original post

SharePoint – Pass a Parameter as FILTER value to a Web Part


Click on the relevant Web Part -> Right Side -> Click on Hyperlink

Keep in mind EACH WebPart has a separate Data Source Field, Filter and Sort Settings !



First Create a New Parameter value based on a Query String Variable.


Next set the DVWP Filter settings


The result is that the data in DVWP will be filtered on load, by the Query String variable.

Second Example is to Filter a DVWP based on a Field value.

Based on the Query String Parameter you can filter the detail list web part for the items added.


It will look like this. There is some garbage appearing on top of the DVWP ?


Solution :

Just open the Form again in SP Designer and comment out that section to get rid of it.

Look in the code for <!—…. –>

Filtering is quite handy !

View original post