Sorting using MySQL ORDER BY Statement

Sorting using PHP MySQL ORDER BY Statement

We use Sorting using MySQL  Order by statement in a recordset.The ORDER BY keyword sort the records in ascending order by default. If you want to sort the records in a descending order, you can use the DESC keyword. SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC You can sort on multiple columns, and you can sort different columns in different directions This query would return me the results ordered by the species in the order I need and then sort […]

Best SEO Services As a Client

Best Seo Services

What do webmasters should expect for their websites or blogs, while choosing an affordable and best seo services? Is it 10s of thousands of traffic? Or, simply listing on the first page of Google at number 1 or number 2 spot? A top class and good SEO services means “much more than traffic and listing on 1st page of Google.” A service which multiply your ROI (Return On Investment), a service which helps you to capture leads, a service which […]

Php Interview Questions and Answers – Part 7


This is the 7th part of Php Interview Questions and Answers. 1- How can we destroy the session, how can we unset the variable of a session? session_unregister() – Unregister a global variable from the current session session_unset() – Free all session variables 2- What are the different functions in sorting an array? Sorting functions in PHP: asort() arsort() ksort() krsort() uksort() sort() natsort() rsort() 3- How can we know the count/number of elements of an array? 2 ways: a) sizeof($array) […]

Convert .xsd file into array in PHP


As we know that PHP has no direct function to convert .xsd(XML Schema Definition) file into associative array like XML file. So you have to  first convert .xsd file into xml then finally parse xml file into associative array. Below are few easy steps to convert .xsd file into associative array.   $doc->preserveWhiteSpace = true; $doc->load(‘yourfile.xsd’); Step 2: Save .xsd file as an xml file. $doc->save(‘myxml.xml’); Step 3: Generate xml as a string and removed xsd prefixes. $myxmlfile = file_get_contents(‘myxml.xml’); […]

Php Interview Questions and Answers – Part 6


1- How can we register the variables into a session? session_register($session_var); $_SESSION[‘var’] = ‘value’; 2- What is the difference between characters �23 and x23? The first one is octal 23, the second is hex 23. With a heredoc syntax, do I get variable substitution inside the heredoc contents? Yes. 3- How can we submit form without a submit button? We can use a simple JavaScript code linked to an event trigger of any form field. In the JavaScript code, we […]

8 SEO Tips For Facebook Graph Search


Facebook Graph Search has a huge database – One billion people, more than 240 billion photos and a trillion connections. To tap this traffic gold mine with your Facebook page, it has to be SEO optimized. It has to emits the necessary signals for maximum visibility in Facebook Graph search. Definition: A Facebook Search Engine which returns the best possible suggestions (search results) when people search for things and relationships they care about. Web search Vs. Facebook Search: When you […]

Php Interview Questions and Answers – Part 5


1- How to reset/destroy a cookie ? Reset a cookie by specifying expire time in the past: Example: setcookie(‘Test’,$i,time()-3600); // already expired time Reset a cookie by specifying its name only Example: setcookie(‘Test’); 2- What types of images that PHP supports ? Using imagetypes() function to find out what types of images are supported in your PHP engine. imagetypes() – Returns the image types supported. This function returns a bit-field corresponding to the image formats supported by the version of […]

Add Rich Snippets to Your Site to Increase CTR


Many a times, traditional, text-only search results are too boring. Can we make the search results more attractive by adding STARs, PICs, $s, and provide extended and more accurate information for quality traffic and better conversion? Yes, you can add a bit of ZING to your search results by integrating structured data markup in to your blog. Simply by adding a piece of code to your blog you can show rich snippets in your search results. What is Rich Snippets? […]

Set your Permalink for Better SEO


Have you set your permalink correctly. If not, do it now to make your blog SEO friendly. Permalinks means – Permanent URLs to your blog posts and categories. These URLs are permanent, they never change, hence called Permalink. For better Search Engine Optimization, correct permalink structure for your blog is most important. Now, I will tell you about 02 types of URLs- 1.Pretty URL and 2.Dirty URL. Example of Dirty URL – Example of Pretty URL after proper restructuring […]

18 Great Tips to Increase Page Rank


How to increase page rank – is a question, which keeps challenging webmasters since long time. Because increase page rank brings the authority to rule the web. Page rank is Google’s measurement of how authoritative or popular a website is, on a scale of 1 to 10. Where 10 implies the most trusted site, and 1 the least. Google decides the page rank by, the total aggregate vote of all inbound links to a particular website. If you want to […]