Archive | MySQL RSS for this section

SUN acquires MySQL!!!!

For all those who love Open Source this news should come exciting, SUN Microsystems has acquired MySQL AB, the company behind the world famous open source Database.

As I see, SUN is merging strong in Open Source with Java, Sun Office, Solaris and Now, Mysql. It sure is here to play a big game with Open Source. IT wud be surely interesting to wait and watch how SUN tries to capture the market.

SUN has already ignited with Start-up essentials and to that package,mysql is a bonus.

Cheerz
SHri

Advertisements

Learn how to play with Flash, Mysql & PHP

Its one of those cool tutorials I have ever come across. It helps us in understaning how to integrate and play with Flash, Mysql and PHP.

I am sure it would help you too.

http://www.creativecow.net/articles/brimelow_lee/php_mysql/php_mysql_flash.html

Cheerz
SHri

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Yahoo SDK & YUI are simply awesome!!!!

I must appreciate the fact on how much Yahoo gives freedom and power to developers through libraries and toolkits.

I am currently using YUI and Yahoo SDK for building a small application and I am highly impressed with the libraries.

For sure Y! are doing great job, making our life lil more simpler ūüôā

I have been using some libraries like Rico, scriptaculous, Dojo and trust me when I say, YUI stands tall here.

If you havent tried it yet, get yourself hooked on http://developer.yahoo.com. Loads of tutorials, code, demos. For FREE

Try it now…

Cheerz
Shri

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book {My Book} at Packt official site
http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Tutorial: How to store UTF8 (indian language) data in mysql?

Well, let me put it straight this tutorial also applies to any other native languages like latin, spanish etc. But, since I have tried for Indian languages I am writing exclusive for it.

Okay, so¬†before we say code I must tell you this tutorial intends, a thought provoking stuff ūüôā

Lately, we have seen enough number of Indic-translators, and you must have got your hands on with typing in ur mail/blog. Now, just think for a while, when u sent a mail, and try to read it back from “Sent Mail”, u still see the indian language or even in that case blog articles. For that case, even in Orkut.

How are they stored inside database? Was what I was trying.

Again, I am not sure for any other DB, I have tried with MySQL. But, I guess should be same.

Quick Explanation:

We assume we have a DB with table¬†articles, and a column¬†named¬†posts, which will save the¬†article¬†written in your blog. Best part, we know that all major DB’s support UTF8. And we shall explore that feature.

Now we write a article in hindi, ŗ§Ļŗ•áŗ§≤ŗ•ćŗ§≤ŗ•č ŗ§Ķŗ§įŗ•ćŗ§≤ŗ•ćŗ§°

If the UTF8 is not specified, you should see something like ?????? in ur DB else u shud see the hindi data. Clear? Koool lets see the code

Quick Code:

First check¬†for UTF8 compatibility with this¬†query. If it supports you should see the output as “Character_set_system”| “UTF8”

SHOW VARIABLES LIKE ‘character_set_system’;

Now that being checked, alter the table and just modify the column, Posts in our above example and specify it as UTF8

ALTER TABLE articles MODIFY Posts VARCHAR(20) CHARACTER SET UTF8;

Now, try to insert the hindi value and save it. Query it and u shud see the hindi text ūüôā

We have go ahead and use many other options as well, like Collate etc. But this tutorial intends to keep it simple.

I hope you find this useful and interesting. If you have tried any hacks similar to this, pls drop in comments and share with us.

Cheerz
Sridhar

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book

http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Tutorial: How-To make a Tag Cloud using PHP & MySQL

How to make Tag Cloud using PHP & MySQL

Tag Clouds are pretty common now-a-days in almost all the web 2.0 company sites. Be it Technorati, Zoom CLouds, WordPress, Blogger etc.

Why Tag Clouds are important?

Pretty much for the same reasoon: Appealing Users.

On seeing all these even I have decided to introduce the Tag Cloud feature in our project.

Now, the very important question: How do we code to create a Tag Cloud using PHP & MySql?

Here I will show you how to code it.

First the logic:

1. Collect all the tags & Count{how-many times it has been tagged} from DB{MySQL}

2. Put them into a array {PHP}

3. Calculate the maximum and minimum count of the tags used

4. Now, loop through each tag and just change the size of the font.

5. Define a simple class say “wrapper” which will contain the tag clouds

6. Call the function to generate the tag cloud.  {Javascript}

Now, since Im falling short of time, so I will cut the crap and you guys take the code directly.

Yes, a word from me, I will surely update it as time permits in full detail.

Cheerz

Srinix

PS: Download the Code here: Tag Cloud Code

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site
http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book

Web tutorials *Yawn Yawn*: Webonic

Do u also Yawn thinking of tutorials available on web? Be it Php, Mysql, CSS etc, Its all same stuff, again and again in new fonts!!!!

Its time for some real new useful stuff and not same yawning.

I have started a new blog, which I call it as my technology playground.

Its important to write code, and Its even more important to build some useful code and share it with community.

Since, this blog is more personal. I will write and collect all the tutorials which I will be working/learning for buliding my own web product.

http://webonic.blogspot.com/

Webonic will contain tutorials, code, demos related to PHP, MySQL, AJAX & CSS. Its not user-generated/collected, all will be stuff I am working on. You are free to add if you want to.

Happy Hacking
Sridhar

Tutorial: How to make Script.aculo.us Based Slideshow

Before you go on to read this article. If your a newbie to using Script.Aculo.us AJAX library, I would recommend my previous post on getting started with Script.Aculo.us.

Read the article here

Okay, so I presume that you have gone through the previous tutorial. In this tutorial we will see how to make a simple slideshow for our website. You can also download the script along with HTML file at the bottom of the tutorial.

Slideshow’s are pretty common among webstites today. But, most of them being in Flash. Since we can add the same beauty using AJAX I thought of giving it a shot.

So lets get started!!! Start Javascript functionality here!!!

<script type=”text/javascript”>

var slides = array(‘slide1′,’slide2′,’slide3’);¬†¬†¬†¬†¬† // we define a array with all the div-Id’s of the slides.

we have to define a variable “wait” so lets declare and assign some value to it.

var wait = 500;    // interval and time in milliseconds

1. We need the slideshow to start as soon as the site is launched.

For that we have to define a javascript function.

function start_slideshow() {

setInterval(SlideShow(), wait);  // This is a javascript function which acts as a timer.

}

Now, we need to define the actual functionality for the slideshow.

function SlideShow() {

Effect.Fade(Slides[i], { duration:1, from:1.0, to:0.0 });
i++;
if (i == 3) i = 0;
Effect.Appear(Slides[i], { duration:1, from:0.0, to:1.0 });

}

2. We have to add this to our html code.

<body onload=”start_slideshow()”>

3. Lets add some slides to the page.

<div id=”slideshow-content”>
<div class=”slide1″ id=”slide1″>
<h2>My First Slide</h2>
<p> Add some content for your first slide.
</p>
</div>                   // First slide div ends here
<div class=”slide2″ id=”slide2″ style=”display: none;”>
<h2>My Second Slide</h2>
<p> Add some content for your second slide.
</p>
</div>              // Second slide div ends here
</div>

Imp Note: Note how we must use an outer DIV tag to use this. Its a must to have an outer DIV tag.

Now, just put all the code in one place and you can see your slideshow working!!!!

If you have tried/ have any suggestions to improve it pls drop in comments.

Cheerz
Shri

PS:
1] Planning to write a tutorial on slideshows based on images with various control effects.
2] You can also download the code in attachments.

Download the tutorial and see it working

Download: slideshow.txt

If you are reading article, you might also be interested in the PHP and Scriptaculous Book I have authored.

The book gives you insights about effects, drag-n-drop, slideshows, applications, auto-completion, in-place editing and more. Complete code snippets and explanations.

CHECK out and BUY the PHP and Script.aculo.us book at Packt official site

PHP and Script.aculo.us Book

PHP and Script.aculo.us Book


http://www.packtpub.com/php-and-script-aculo-us-web-2-0-application-interface/book