Home » Archive

Articles tagged with: MySQL

Database, MySQL, SQL »

[15 May 2010 | One Comment | 998 views]

The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables. [@via w3schools]
A SQL JOIN clause combines records from two or more tables in a database. It creates a set that can be saved as a table or used as is. A JOIN is a means for combining fields from two tables by using values common to each. ANSI standard SQL specifies four types of JOINs: INNER, OUTER, LEFT, and RIGHT. In special cases, …

Magento, MySQL »

[31 Dec 2009 | 7 Comments | 3,192 views]

Suppose, you have a product collection and you want to filter it by category. Suppose, you want to filter it by more than one category. You can use addCategoryFilter if you have only one category. But, what if you want to filter by more than one category?
Category ids are stored for product in a comma separated way. So, to filter product collection by more than one category, you have to use:
addAttributeToFilter(‘category_ids’,array(‘finset’=>$categoryIds));

Magento »

[9 Dec 2009 | 2 Comments | 2,071 views]

You can add attribute from Admin Panel -> Catalog -> Attributes -> Manage Attributes.
You can also add attributes from mysql setup file of your module. MySql setup file is present inside “YourModule/sql/yourmodule_setup” directory.

Magento »

[7 Dec 2009 | No Comment | 441 views]

Suppose, you have a module called MyModule. Its version is 0.1.0. Now, you want to do some database changes for the module. You have the mysql setup file (mysql install file) mysql4-install-0.1.0.php in MyModule/sql/mymodule_setup folder of your module.
You don’t need to make direct changes to database. You can upgrade your module to make your necessary database changes. To do so,

MySQL, PHP »

[5 Mar 2008 | One Comment | 624 views]

Before I had posted an article to add, edit, delete, and display contents. I had also included sessions there. There was the facility to login and register users too.
But i got feedback that it was a bit complex for novice users of PHP (users who have just started PHPing). It was a kind of full-fledge system with PHP, MySQL and session.

MySQL, PHP »

[9 Dec 2007 | No Comment | 40 views]

Problem:
Concatenate and fetch data from two fields of database and then break it again.
Solution:

MySQL, PHP »

[8 Dec 2007 | 2 Comments | 694 views]

Hello everyone! here is a simple and complete tutorial to add, edit, delete, login, and register in PHP with MySQL database.
The description is present in the code.. in comments :D I hope those comments are sufficient to describe the code. The database part is in the sql file named ‘database.sql’.

MySQL »

[10 Oct 2007 | No Comment | 75 views]

1) To make a backup of a single MySQL database
You have to make backup before you enter inside your MySQL system i.e. by typing mysql –u username –p password . (Here, username and password indicates your MySQL server username and password.)

MySQL »

[6 Sep 2007 | No Comment | 13 views]

Problem:
“Fails to start the service. Please wait 30 seconds to try again.”
I faced this problem 2 years back when I was a newbie to MySQL. I was just starting to learn PHP and MySQL at that time.

MySQL »

[20 Aug 2007 | No Comment | 44 views]

Problem: can’t create pid file: no such file or directory
I had this problem and had a very tough and frustrating time with it. While I was installing a fresh copy of MySQL 5 in Windows XP, I got this problem. (I was installing it from the installer i.e. setup file.) The server was not starting and ‘error 0′ was displayed. I tried to start the server from the command line by typing “mysqld-nt –console” and then got the error “can’t create pid file: no such file or directory”. It was …