You are currently browsing the category archive for the 'MySQL' category.

At last i start my web programming into ubuntu using lampp. Its really fun. But first Time I’ve a problem to install xampp server. So I start to finding solve of this problem. And I done it. Now I want to share this solution to you.

First You have to download xampp for ubuntu/linux. Then save the installation file into your home folder. Now open terminal & write the following command

————————————————————————————

sudo tar xvfz xampp-linux-1.6.6.tar.gz /opt

————————————————————————————

Then this will extract the file into opt folder.

If extraction complete properly then your installation complete.

For start your xampp server type the following commed

———————————————————

sudo /opt/lampp/lampp start

———————————————————

And stop the server write the command

————————————————————

sudo /opt/lampp/lampp stop

————————————————————

Now enjoy lampp server &-)

Recently I’m working on bangla. The part of this work I learn how to insert & retrieve bangla into MYSQL database using PHP.
Now I’ll discuss the whole process of insert & retrieve bangla into MYSQL database.

It is very easy, we all know how insert & retrieve data from database. Bangla font inserting is almost same. Only two queries are extra needed.

First we have created a database & table using MYSQL to insert bangla.
Now open the mysql command prompt & create database named bangla, & create a table named data.
Now write those command:

  • mysql> set names ‘utf8′;
  • mysql> create database bangla character set utf8 collate utf8_general_ci;
  • mysql> use bangla;
  • mysql> create table data (name varchar(100) character set utf8 collate utf8_general_ci);

Insert Bngla into database:
So we create database & table for where we insert bangla font. Now we have to create a simple form where we input bangla word.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<form method=”get” action=”bangla.php”>
insert bangla<input name=”name” type=”text” />
<br />
<br />
<input type=”submit” value=”insert bangla” />
</form>
<body>
</body>
</html>

Now just copy the code & save as banglainput.php.

Now insert bangla font into database.

<?php

$cnt = mysql_connect(“localhost”,”root”) or die (“could not localhost”);

mysql_select_db(‘bangla’,$cnt);
//********This Two Lines for bangla*********//
mysql_query(‘SET CHARACTER SET utf8′);mysql_query(“SET SESSION collation_connection =’utf8_general_ci’”) or die (mysql_error());
//*******************************************//

$sql = mysql_query(“insert into data values(‘$_GET[name]‘)”) or die(“error to creating row”);

$results = mysql_query(“select *from data”,$cnt);

echo “the results is “;

while($row = mysql_fetch_array($results))

{

echo $row['name'] .’ ‘;

}

?>

Now copy these code and save as bangle.php.

You must add these two lines just after selecting the database, i.e mysql_select_db() function.
mysql_query(’SET CHARACTER SET utf8′);
mysql_query(”SET SESSION collation_connection =’utf8_general_ci’”);


Its very easy Just Copy those code paste and run. Ooo the most importnt thing, you need a unicode for insert & retrive. i use avro unicode. So you must download avro unicode.

this tutorial is referenced by saidur vai.

WELLCOME

Hi, I’m saeed Ahmed. Study in computer science & engineering at Rajshahi University of engineering & Technology. I enjoy programming; recently I work on web applications. Please feel free to share and suggest me your good thoughts. Email me: saeedmail@yahoo.com

 

November 2009
S S M T W T F
« Aug    
 123456
78910111213
14151617181920
21222324252627
282930  

My Linkedin Profile

FOLLOW ME ON TWITTER :)

Categories

Archives

Blog Stats

  • 11,245 hits

Some Moment Can't Never Forget

Image013

profile

5493_1195770810448_1113791260_30638811_5916842_n

5493_1195767570367_1113791260_30638805_6606845_n

amre dhakkay sob agune pheltace

rokib guru, emon ganju, me & rasel ghoti

More Photos