Archive for the 'Php' Category

Apr 14 2009

How To Smarty Cache

Published by Root under Php, smarty

Ok. If you use smarty and some part of your web site are no need to uptime any time, we can use the Smarty cache.
But smarty cache is not usefull for big project. But you can use in very simple let’s start.
First Prepare script for smarty.
require ‘kernel/libs/Smarty.class.php’; // This is my smarty class.
$smarty = [...]

2 responses so far

Feb 24 2009

Zend Cache with Zend Framework (Simple Function)

Published by Root under Php, programlama, zend

Ok. In my new project we have a lot of dymanic part. This part actually not up-to-date every time. (maybe one or two times in a day). If we use html for this part , we are so tried to update it. If we use sql all time (daily 2k+ visitor and growing) [...]

No responses yet

Feb 01 2009

We are in Mysql Speed Test (Myisam vs InnoDB)

Published by Root under Mysql, Php, programlama, zend

Ok. In present day, almost everybody have a web site. Actually many kind of web site is dynamic. I change my decision to mysql. (maybe later postgresql or another)
And in starting every kind of database fast and doing their job clearly. So time is past and past and past and past ……… [...]

2 responses so far

Jan 20 2009

Sefurl with Zend Framework

Published by Root under Php, programlama, zend

Zend is very powerfull framework. We want to use some kind of big project but we have a problem.
Problem is; url sef link http://www.example.com/article/2009/06/sef-url-with-zend.html
But we want to: http://www.example.com/sef-url-with-zend.html
Ok; Everybody says “You can do it with Zend Router”, but how?
Answer:
You open index.php and insert
Zend gerçekten çok güçlü frameworktür. Bir çok büyük projede kullanabiliriz. Ama [...]

2 responses so far

Jan 13 2009

InnoDB vs MyISAM

Published by Root under Mysql, Php, programlama

On Internet most people use “MYISAM” storage engine. This engine is so good for web application. But we have a lot of alternative. This article has InnoDb and MyIsam engines.
InnoDB:

Innodb has no Fulltext search. This one is very bad thing (I think).
Innodb is powerfull. More secure for crash.
Innodb has foreign keys. It [...]

No responses yet

Sep 19 2008

How can add our excel files to mysql

Published by Root under Mysql, Php, excel, programlama

The scenario;
I have an excel list about our costumers info. So i want to add all excel data in to mysql.
First i must save excel (.csv) format. And open my php script. my php script;
[PHP]
$firstTakeAllData=file_get_contents($filenameofcvs);
$secondAddArray=explode(”n”,$firstTakeAllData);
foreach ($secondAddArray as $key=>$takeMyDataFor)
{
$mysqlData=explode(”;“,$takeMyDataFor);
mysql_query(’INSERT into mycostumer (name,surname,street,tel,email) values (”$mysqlData[0]“,”$mysqlData[1]“,”$mysqlData[2]“,”$mysqlData[3]“,”$mysqlData[4]“)’); // It’s good for one user but this a lot of query [...]

No responses yet

Sep 19 2008

Create random password in mysql

Published by Root under Mysql, Php, programlama

The scenario;
I coded my script but i want to change password with mysql. (Maybe want to change a lot row). My password length have 8 character.
[MYSQL]
UPDATE mycostumerdata SET password=SUBSTRING(MD5(ROUND(RAND(9999)*1000)),1,8)
[/MYSQL]
You can add any coloum for better random password.
Web sitesi programlaması yaparken bazen eski veritabanlarımızdan yararlanabiliriz. Bu kayıtlarımıza ait şifreleri yeniden oluşturmak bazen düşündüğümüzden daha zor olabilir. [...]

No responses yet