Archive: All Interview Questions
-
Aug 19, 2011
No Comments15 useful WordPress Functions you probably don’t know
While I was building my first premium WordPress Plugin – the Avia Feedback Box – I needed to solve quite a few problems I have never encounterd when creating themes. During my research I stumbled upon several really cool wordpress functions that I want to share with you. WordPress Transient API set_transient(), get_transient(), delete_transient() This...
-
Aug 19, 2011
No CommentsCreate a multilevel Dropdown menu with CSS and improve it via jQuery
Some of you might have noticed, I have a partiality for sleek menus. As I recently had to create a multi level dropdown menu for one of my customers, I wanted to improve it with a little bit of jQuery, but couldn’t find a script that accomplished what I needed. So I decided to build...
-
Aug 16, 2011
No CommentsSending e-mail from localhost in PHP in Windows Environment
Have you ever been frustrating, why e-mail is not going from the localhost while using XAMPP or WAMP or any other PHP servers in windows environment? well in that situation i think i can help you.In this article i am going to tell you how to send e-mail from localhost in PHP. 1) Open...
-
Aug 16, 2011
No CommentsjQuery plugin: word-counter for textarea
Sorry friends on the way of move to new home I’ve been lost from the blog as I didn’t have internet connection for few last weeks. Now, I’m back and I try to be regular as much as I can. Inspired from the new feature of wordpress 2.6.x which displays word count of each post,...
-
Aug 16, 2011
No Commentscustom query in magento a zend approach
I’ve already mentioned about custom query in Magento, before but now I think its time to upgrade that method to next level because it would always be good to have standard code for reference.So it is just a new improved way of using a custom query. First of all we will need is a connection...
-
Aug 16, 2011
No Commentsgenerating invoiceorders next increment id in magento
Magento has its own way of generating increment ID for new invoices and new orders after they are saved. But how about knowing them before hand, i.e before the invoice or the order is created! Lets first understand the working of those increment ID generation before jumping to the code. As all of us must...
-
Aug 16, 2011
No Commentsadding custom javascript on admin form in magento backend
Sometimes in Magento, while creating a custom module we need to add our custom Javascript code in our Admin form. These Admin forms we create are extened from the Magento’s core form widget. So there is a less flexibiliy of adding a custom Javasccript code in such types of Admin forms. What to do if...
-
Aug 16, 2011
No Commentsadding css class name to my account link anchor tag in magento through xml layout
At the first instance I thought WTH! must be pretty simple, add params in XML layout and “Voila!“. But later I found that it was not simpler as I thought. I had to get into the addLink method for sometime (1/2hr) and finally I came up with correct structure of XML layout. At the end...
-
Aug 16, 2011
No Commentsworking ajax json objects magento case ajax powered login functionality
Previously I have written about Working With Ajax in Magento. And after a huge response I received from that post I was compelled to write more on implementing Ajax in Magento. And this time I want to say additionally about handling JSON (JavaScript Object Notation) along with Ajax, within the Magento enviornment. JSON Objects and...
-
Aug 16, 2011
No Commentsdisplaying currency code after the price value in magento
I had a time to research on Magento’s currency format and its display on Magento webshop. I then came across a block where I could change the format of currency display, in this case I am talking about moving the currency symbol to the right of the price value. In other words I found a...
-
Aug 16, 2011
No Commentsmagento setting default shipping method cart page
I recently came to a situation where I need to show a shipping price amount on cart before selecting the shipping address from the checkout page. Basically shipping price is shown after the user has added the shipping address and selected the shipping method. So to show shipping price on cart page load, I needed...
-
Aug 16, 2011
No Commentsmagento creating ajax updated tabs frontend product management tabs backend
Magento’s Product Management GUI in back-end has Tabbed Navigation. There are two types of Tabs implemented there. One type of Tab is normal tab, loading content on page load while other type of tab has its content loaded by “Ajax”. Another interesting thing to note is that once the Ajax loaded tab’s content is loaded...
-
Aug 16, 2011
No CommentsHow to Use SQL JOIN to Retrieve Data from Multiple Tables : php2php.com
Summary: In this tutorial, you will learn how to use SQL JOIN to select data from multiple database tables. You will learn different kinds of JOIN including inner join, outer join, left and right joins. In the previous tutorial, you’ve learned how to retrieve data from one table by using SELECT statement. But normally you...
-
Aug 16, 2011
No Commentshow to Avoid Displaying NULL Values by Mapping to Other Values : php2php.com
The NULL was introduced by the creator of relational database model, Dr.E.F.Codd. In relational database management systems, NULL means unknown value or the value does not exist in database. MySQL supports NULL to represents the concept of missing information and inapplicable information. Sometimes, we have to display the stored data which has NULL value to...
-
Aug 16, 2011
No CommentsCompare Two Tables to Find Unmatched Records : PHP2PHP.com
In database programming, sometimes you have to compare two tables (or two views of more than two tables) to find the unmatched records and the difference between two records in two tables with the same identity. As an example, in database migration you have a legacy database and new database with two different database schemata....
-
Aug 16, 2011
No CommentsSelect the Nth Highest Record in a Database Table : PHP2php.com
Summary: In this tutorial, you will learn how to select the Nth highest record in a database table by using various techniques. These techniques are very useful, for instance you may want to see the product which is second most expensive in Products database table. The first idea is we get the Nth highest result...
-
Aug 16, 2011
No CommentsCount Records in a Database Table in MySQL : php2php.com
Summary: In this tutorial, you will learn how to use an aggregate function called MySQL COUNT to count number of records in a database table. In order to count a number of records in a database table we can use standard SQL COUNT function. The syntax is quite simple as follows: 1 SELECT COUNT(*) AS...
-
Jul 26, 2011
1 CommentHow to Use MySQL REPLACE to Insert or Update Data
Summary: In this tutorial, you will learn how to use MySQL REPLACE statement to insert or update data in database tables. MySQL REPLACE statement is a MySQL extension to SQL standard. MySQL REPLACE works like INSERT statements with the following rules: If the record being inserting does not exist, MySQL REPLACE will insert a new...
-
Jul 26, 2011
No CommentsDeleting Records from Tables Using MySQL DELETE
Summary: The MySQL DELETE statement not only allows you to delete record from one table but also multiple tables. In this tutorial, you will learn how to use MySQL DELETE statement with examples. To remove all rows or records from a database table you use MySQL DELETE statement. The following illustrates MySQL DELETE statement: 1...
-
Jul 26, 2011
No CommentsUpdating Data in Database Tables
Summary: Updating existing data is one of the most important task when you work with database. In this tutorial, you will learn how to use MySQL UPDATE statement to update data in database tables. SQL UPDATE statement is used to update existing data in database tables. It can be used to change values of single...