Bu Blogda Ara

4 Eylül 2010 Cumartesi

adsense Features

AdSense volume graphics and the ability to perform the standard steps such as more detailed report provides a new interface features. Fill in the new interface will be in beta testing, we have abandoned our interest.
Sensitive categories now Japanese, Chinese, Polish and Portuguese for the block

In order to broaden access to sensitive categories (also known as a filter category) locks worldwide, officially announced this sensitive category, Japanese, Chinese, Polish and Portuguese are pleased to announce that block. As you know, this feature also in English, French, German, Spanish, Italian, Dutch, Arabic and Russian language test is to be done.

Blocking time sensitive categories, 11 specific categories announced to appear on your page you can prevent. If there is any one of the supported languages, regardless of what ad in this category, they will be blocked if your pages have been targeted.

Sensitive to block a category in your account, please create a login and Ad Review Center, "Profiles AdSense" I want to visit places. After you click change, 'you see the complete list of categories can be blocked. Moreover, the effects of these filters to help them understand, we, the income and exposure from the last 30 days in each category will receive shares.

For more information about how to prevent sensitive categories, we invite you to visit our help center.

AdSense email preferences: Get the most from your account and from Google

The new AdSense interface offers features such as more detailed reports with graphs and the ability to complete common actions in bulk. Fill out our interest form, and we may be able to include you in the beta test of the new interface.

AdSense email preferences: Get the most from your account and from Google

Monday, August 30, 2010 | 9:10:00 AM

Labels:

Have you checked your AdSense email preferences lately? If not, you may be missing out on important information and special offers without realizing. Take a minute to log in and update your email preferences under the ‘My Account’ tab.

Want to be invited to upcoming events like AdSense In Your City? Make sure you check the box next to Special Offers when you edit your email preferences so you can stay up-to-date with giveaways and other special programs in your area.

Want tips from the AdSense team for how to earn more with your AdSense account? Check Customized help and performance suggestions and/or Newsletters so we can offer personalized guidance to improve performance and maximize your revenue.

Want to help us improve AdSense by testing out features like the new AdSense interface? Check Google Market Research and you’ll be able to share your valuable feedback with us through surveys and beta tests.

Want promotions and key updates for other Google products that can help you grow your AdSense business? Check Information about other Google products and services which may be of interest to you so we can send you news and coupons based on your potential needs.

We want to help you earn more with tips and promotions, invite you to in-person events, and gather your feedback so we can continue to improve AdSense. So log in, update your preferences, and take advantage of the opportunities coming your way from the AdSense team!

29 Ağustos 2010 Pazar

PHP in Array Introduction

PHP Array Introduction

The array functions allow you to manipulate arrays.

PHP supports both simple and multi-dimensional arrays. There are also specific functions for populating arrays from database queries.


Installation

The array functions are part of the PHP core. There is no installation needed to use these functions.


PHP Array Functions

PHP: indicates the earliest version of PHP that supports the function.

Function Description PHP
array() Creates an array 3
array_change_key_case() Returns an array with all keys in lowercase or uppercase 4
array_chunk() Splits an array into chunks of arrays 4
array_combine() Creates an array by using one array for keys and another for its values 5
array_count_values() Returns an array with the number of occurrences for each value 4
array_diff() Compares array values, and returns the differences 4
array_diff_assoc() Compares array keys and values, and returns the differences 4
array_diff_key() Compares array keys, and returns the differences 5
array_diff_uassoc() Compares array keys and values, with an additional user-made function check, and returns the differences 5
array_diff_ukey() Compares array keys, with an additional user-made function check, and returns the differences 5
array_fill() Fills an array with values 4
array_filter() Filters elements of an array using a user-made function 4
array_flip() Exchanges all keys with their associated values in an array 4
array_intersect() Compares array values, and returns the matches 4
array_intersect_assoc() Compares array keys and values, and returns the matches 4
array_intersect_key() Compares array keys, and returns the matches 5
array_intersect_uassoc() Compares array keys and values, with an additional user-made function check, and returns the matches 5
array_intersect_ukey() Compares array keys, with an additional user-made function check, and returns the matches 5
array_key_exists() Checks if the specified key exists in the array 4
array_keys() Returns all the keys of an array 4
array_map() Sends each value of an array to a user-made function, which returns new values 4
array_merge() Merges one or more arrays into one array 4
array_merge_recursive() Merges one or more arrays into one array 4
array_multisort() Sorts multiple or multi-dimensional arrays 4
array_pad() Inserts a specified number of items, with a specified value, to an array 4
array_pop() Deletes the last element of an array 4
array_product() Calculates the product of the values in an array 5
array_push() Inserts one or more elements to the end of an array 4
array_rand() Returns one or more random keys from an array 4
array_reduce() Returns an array as a string, using a user-defined function 4
array_reverse() Returns an array in the reverse order 4
array_search() Searches an array for a given value and returns the key 4
array_shift() Removes the first element from an array, and returns the value of the removed element 4
array_slice() Returns selected parts of an array 4
array_splice() Removes and replaces specified elements of an array 4
array_sum() Returns the sum of the values in an array 4
array_udiff() Compares array values in a user-made function and returns an array 5
array_udiff_assoc() Compares array keys, and compares array values in a user-made function, and returns an array 5
array_udiff_uassoc() Compares array keys and array values in user-made functions, and returns an array 5
array_uintersect() Compares array values in a user-made function and returns an array 5
array_uintersect_assoc() Compares array keys, and compares array values in a user-made function, and returns an array 5
array_uintersect_uassoc() Compares array keys and array values in user-made functions, and returns an array 5
array_unique() Removes duplicate values from an array 4
array_unshift() Adds one or more elements to the beginning of an array 4
array_values() Returns all the values of an array 4
array_walk() Applies a user function to every member of an array 3
array_walk_recursive() Applies a user function recursively to every member of an array 5
arsort() Sorts an array in reverse order and maintain index association 3
asort() Sorts an array and maintain index association 3
compact() Create array containing variables and their values 4
count() Counts elements in an array, or properties in an object 3
current() Returns the current element in an array 3
each() Returns the current key and value pair from an array 3
end() Sets the internal pointer of an array to its last element 3
extract() Imports variables into the current symbol table from an array 3
in_array() Checks if a specified value exists in an array 4
key() Fetches a key from an array 3
krsort() Sorts an array by key in reverse order 3
ksort() Sorts an array by key 3
list() Assigns variables as if they were an array 3
natcasesort() Sorts an array using a case insensitive "natural order" algorithm 4
natsort() Sorts an array using a "natural order" algorithm 4
next() Advance the internal array pointer of an array 3
pos() Alias of current() 3
prev() Rewinds the internal array pointer 3
range() Creates an array containing a range of elements 3
reset() Sets the internal pointer of an array to its first element 3
rsort() Sorts an array in reverse order 3
shuffle() Shuffles an array 3
sizeof() Alias of count() 3
sort() Sorts an array 3
uasort() Sorts an array with a user-defined function and maintain index association 3
uksort() Sorts an array by keys using a user-defined function 3
usort() Sorts an array by values using a user-defined function 3


PHP Array Constants

PHP: indicates the earliest version of PHP that supports the constant.

Constant Description PHP
CASE_LOWER Used with array_change_key_case() to convert array keys to lower case
CASE_UPPER Used with array_change_key_case() to convert array keys to upper case
SORT_ASC Used with array_multisort() to sort in ascending order
SORT_DESC Used with array_multisort() to sort in descending order
SORT_REGULAR Used to compare items normally
SORT_NUMERIC Used to compare items numerically
SORT_STRING Used to compare items as strings
SORT_LOCALE_STRING Used to compare items as strings, based on the current locale 4
COUNT_NORMAL
COUNT_RECURSIVE
EXTR_OVERWRITE
EXTR_SKIP
EXTR_PREFIX_SAME
EXTR_PREFIX_ALL
EXTR_PREFIX_INVALID
EXTR_PREFIX_IF_EXISTS
EXTR_IF_EXISTS
EXTR_REFS

15 Ağustos 2010 Pazar

Ajax control toolkit nedir, nasil kurulur,ne ise yarar

Ajax control toolkit ile gelen bir sürü kontrolün visual studio çalışma ortamına nasıl eklendiğine hep beraber bakalım.

Günümüzde web platformu yeni bir dönemece girmiş, bir çok yeni teknoloji ile web programcıların sıkıntıları bir nebze olsun azalmıştır. Platformlar web ortamını ne kadar masaüstüne yaklaştırırsa o kadar rağbet görürler. Yeni nesil web uygulamaları dediğimiz zaman direk akla gelen isimdir Ajax. Programcıların sorunlarını çözdüğü noktalar, getirdiği yenilikter tartışılamaz. Lafı fazla uzatmadan toolkitten bahsetmek istiyorum. Bir dizi bizim için hazırlanmış ajax kontrolleri bu paketle birlikte visual studio'ya entegre oluyor ve nasıl bir textbox'ımızı butonunumuzu sürükleyio bırakarak kullanabiliyorsak, bu toolkit ile gelen kontrolleri de aynı şekilde kullanabiliyoruz. Peki nasıl kuracağız?

Öncelikle visual studio 2008 ve 2008'in service pack 1 paketi kurulu olması gerekir. Yani bu toolkit .net 3.5 sp1 için diyebiliriz. Adım adım bakacak olursak

1-Ajax Control Toolkiti download ediyoruz.

AJAX CONTROL TOOLKIT
burada 3 seçeneğimiz var, istersek tam kurulum olarak alabiliriz, istersek sadece dll'leri, istersek sadece scriptlerinide alabiliriz. Biz dll'lerini alacağız ve projemiz referans olarak ekleyeceğiz.

2-Zipli dosyadan AjaxControlToolkitBinary adlı klasörü çıkarıyoruz.

3-Visual Studio 2008'imizi açıyoruz.

4-Yeni bir Web Application oluşturuyoruz.

5-Toolbox'ımızda yeni bir sekme oluşturuyoruz ve istediğimiz bir isim veriyoruz.

Bu adım isteğe bağlı, ama yapmanızı tavsiye ederim. Çünkü yaklaşık 40 tane yeni kontrol geliyor ve bunların hepsinin bir yerde durması erişebilirlik açısından daha mantıklı olacaktır.

http://resim.sanalkurs.net/uploads/image_thumb_5.jpg


6-Oluşturduğumuz sekmede sağ tuşa basıyoruz ve choose items diyoruz.

Karşımıza çıkan menüden browse diyerek download ettiğimiz klasörün içinde çıkan AjaxControlToolkit.dll isimli dll dosyasını ekliyoruz.

http://resim.sanalkurs.net/uploads/image_thumb_2.jpg

7-Ajax ile yapılmış 42 tane yeni kontrol göreceksiniz.

Artık kontrollerimizi web sayfamıza sürükleyip bırakarak kullanabiliriz. Toolkit ile ilgili yenilikleri, değişiklikleri, gelişmeleri buradaki adresten takip edebilirsiniz.

http://resim.sanalkurs.net/uploads/image_thumb_6.jpg

Henüz 2008'e geçmediyseniz .net 2.0 içinde bir toolkit mevcut. Ama Ajax 3.0 ile birlikte geldiği için 2.0'a elinizle önce Ajax'ı eklemeniz gerekiyor. Sonra da Ajax Control Toolkit'i.

1 Ağustos 2010 Pazar

Mysql Veritabanına Giriş Yapıyoruz

PHP , esnek bir web yazılım dilidir . Günümüzün gelişmiş birçok yazılım dilleri gibi birden fazla veritabanı (database) ile uyumlu halde çalışabilmektedir . Türkiye şartlarında düşünürsek , yazılım sektöründe PHP ile akla gelen ilk veritabanı MySQL olduğu için , ayrıca ORACLE , SQL ve diğerlerine nazaran PHP ile daha kullanışlı görünen veritabanı olduğu için , MYSQL derslerini yayınlamayı uygun buldum. MySQL genellikle PHP ile birlikte kullanılan ücretsiz bir veritabanı sunucusudur.

MySQL Nedir?

MySQL bir veritabanıdır.Veritabanı , bilgileri saklayan yapıları tanımlar.

Bir veritabanında , HTML tabloları gibi satır, sütun içeren tablolar bulunur.

Veritabanı , kategorilere göre veri saklamak için en uygun sistemdir. Bir şirketin örnek bir veritabanında “Müşteri” , “Ürün” , “Çalışanlar” ve “Sipariş” tabloları bulunur.
Veritabanı TablolarıOrtalama bir veritabanı genellikle bir veya birden fazla tablo içerir.Her tablo (“müşteri” veya “Sipariş” gibi) isimlendirilir. Her tablo veri kayıtlarını saklar.Aşağıda “insanlar” adında örnek bir tablo yaptık, inceleyelim :
Soyisim isim adres Şehir
Veli Uyanık Çankaya 10/2 Ankara
Cengiz Hayıf Cebeci 10/23 Ankara
Galip Bölük Strrazburg 20 Ankara
Sorgular

Sorgu, bir soru veya istek anlamındadır.

MySQL kayıtlarında , veritabanına yaptığımız sorgularda özel bilgileri, bir kayıtlı tablo kümesine sorgu yapabiliriz.

Aşağıdaki sorguya bakalım:

SELECT Soyisim FROM insanlar

Bu sorgu insanlar tablosunudaki Soyisim satırını bulur ve kayıtlı verileri döndürür:
Soyisim
Veli
Cengiz
Galip

MySQL Veritabanı İndirin

MySQL veritabanı sunucunuz PHP ile birlikte yüklememişse , ki PHP Kurulum yazımda kullanabileceğiniz PHP Web sunucuları hakkında detaylı bilgiler bulunur , aşağıdaki linkte , MySQL resmi web sitesinden veritabanınızı indirin: http://www.mysql.com/downloads/index.html

27 Temmuz 2010 Salı

Php ile Jquery Kullanımı

merhaba arkadaşlar epey zamandır sizlerden ayrı kaldım. Bu sürede php' ye olan ilgimden bir şey eksilmedi hatta ilgim arttı diyebilirim. Bundan sonraki yazı dizilerimde php ile Jquery kütüphanesini sizlere anlatmaya çalışacağım. Umarım işşinize yarar bilgiler sunabilirim. Görüşmek üzere.

20 Temmuz 2010 Salı

Php'de MD5 Fonksiyonu

Değiştirgeler

dizge

Özeti hesaplanacak dizge.

ham_çıktı

İsteğe bağlı bu değiştirgede TRUE belirtirseniz MD5 özeti 16 bayt uzunlukta ham ikil biçemli bir dizge olarak döner. FALSE öntanımlıdır.




$str
= 'apple';

if (
md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
echo
"Would you like a green or red apple?";
}
?>

17 Temmuz 2010 Cumartesi

php de diziler ve döngüler

Giriş

Bu var yazının son bölümlerinde nasıl metin ve değişkenler PHP ile başa çıkmak için size gösterdi ve nasıl ifadeler IF kullanabilirsiniz bunları karşılaştırmak ve kararlar almak.Nasıl PHP, döngüler bir başka önemli bölümünü kullanmak için size göstermek için gidiyorum bu bölümde.

The WHILE Loop WHILE Loop

WHILE döngü bir PHP en yararlı komutlar biridir. Aynı zamanda oldukça kurulumu kolaydır ve kullanmaktır. WHILE döngüsü, isminden de anlaşılacağı gibi, belirli bir koşul kadar karşılanmaktadır bir kod parçası yürütülür.

Repeating A Set Number Of Times Times Set Number Of A Yinelenen

If you have a piece of code which you want to repeat several times without retyping it, you can use a while loop. Onu yeniden yazmanız olmadan birkaç kez tekrarlamak istiyorum kod bir parça varsa, bir süre döngü kullanabilirsiniz. For instance if you wanted to print out the words "Hello World" 5 times you could use the following code: Örneğin size "Merhaba Dünya" 5 kat aşağıdaki kodu kullanabilirsiniz kelimeleri yazdırmak istiyorsa için:

$times = 5; $ Zaman = 5;
$x = 0; $ X = 0;
while ($x < $times) { ($ Times) <$ x while (
echo "Hello World"; echo "Merhaba Dünya";
++$x; + + $ X;
} )

I will now explain this code. Şimdi bu kodu açıklayacağız. The first two lines are just setting the variables. İlk iki satır sadece değişkenler ayarı vardır. The $times variable holds the number of times you want to repeat the code. $ Kere değişken kez kodu tekrar istediğiniz numarayı tutar. The $x variable is the one which will count the number of times the code has been executed. $ X değişkeni kez kod yürütülmesinden sayısını olacak olanıdır. After these is the WHILE line. Bu WHILE satır sonra. This tells the computer to repeat the code while $i is less than $times (or to repeat it until $i is equal to $times). $ I dolardan az kez (ya da bunu tekrarlayan kadar $ i $ eşit kat iken bu kod tekrarlamak için) bilgisayar söyler. This is followed by the code to be executed which is enclosed in { }. Bu kod tarafından hangi çalıştırılması gereken içine alınır izliyor ().

After the echo line which prints out the text, there is another very important line: metin yazdırır satır echo sonra, bir başka çok önemli satır:

++$x; + + $ X;

What this does is exactly the same as writing: Bu ne yapar tam olarak yazma aynıdır:

$x = $x + 1; $ X = $ x + 1;

It adds one to the value of $x. Dolar x. değerini bir ekler This code is then repeated (as $x now equals 1). Bu kod (as $ x şimdi 1 eşittir) tekrarlanır. It continues being repeated until $x equals 5 (the value of times) when the computer will then move on to the next part of the code. Bu x kadar $ tekrarlanma devam eşittir 5 (kez değer) Bilgisayar ardından kod sonraki bölüm için hareket edecek.

Using $x $ Kullanma x

The variable counting the number of repeats ($x in the above example) can be used for much more than just counting. Değişken tekrarlar ($ x yukarıdaki örnekte olduğu gibi) sayısını sayma için sadece sayım çok daha fazla kullanılabilir. For example if you wanted to create a web page with all the numbers from 1 to 1000 on it, you could either type out every single one or you could use the following code: Örneğin her tek bir veya aşağıdaki kodu kullanabilirsiniz, olabilirsin ya tip dışarı üzerine 1000-1 tüm numaraları ile bir web sayfası oluşturmak istiyorlarsa için:

$number = 1000; $ Sayısı = 1000;
$current = 0; $ Akım = 0;
while ($current < $number) { ($ While ($ cari
++$current; + + $ Akım;
echo "$current
";
echo "$ cari
";

} )

There are a few things to notice about this code. Bir kaç şey bu kodu ilgili fark vardır. Firstly, you will notice that I have placed the ++$current; before the echo statement. Öncelikle, ben + + $ güncel yerleştirilir farkedeceksiniz; beyanı yankı önce. This is because, if I didn't do this it would start printing numbers from 0, which is not what we want. Bu da 0 dan, bu bizim istediğimiz değil baskı sayıları başlayacak yapmadı eğer olmasıdır. The ++$current; line can be placed anywhere in your WHILE loop, it does not matter. + + $ Akım; satırı her yerde WHILE döngüsü içinde yer olabilir, hiç önemli değil. It can, of course, add, subtract, multiply, divide or do anthing else to the number as well. Tabii, ekleyebilir, çıkarma, çarpma veya bölme başka numaraya de olsaydın yok.

The other reason for this is that, if the ++$current; line was after the echo line, the loop would also stop when the number showed 999 because it would check $current which would equal 1000 (set in the last loop) and would stop, even though 1000 had not yet been printed. bu için diğer nedeni de, + + $ akım; satır satır echo sonra döngü de dolar olan 1000 (son döngü set eşit olacaktır geçerli onay çünkü zaman sayı 999 gösterdi durur olsaydı) ve rağmen, 1000 henüz basılmış olmamıştı tutardım.

Arrays Diziler

Arrays are common to many programing languages. Diziler çok programlama dilleri yaygındır. They are special variables which can hold more than one value, each stored in its own numbered 'space' in the array. Onlar bir değer, kendi içinde her depolanan fazla tutabilir özel değişkenlerdir 'dizisinde yer sayılı. Arrays are extremely useful, especially when using WHILE loops. Diziler son derece yararlı, özellikle WHILE döngüleri kullanıyor.

Setting Up An Array Dizi bir Ayarlama

Setting up an array is slightly different to setting up a normal variable. Normal bir değişken kurmanın bir dizi ayarlama biraz farklıdır. In this example I will set up an array with 5 names in it: Bu örnekte ben de 5 isimlerle bir dizi kuracak:

$names[0] = 'John'; $ Isim [0] = 'John';
$names[1] = 'Paul'; $ Isim [1] = 'Paul';
$names[2] = 'Steven'; $ Isim [2] = 'Steven';
$names[3] = 'George'; $ Isim [3] = 'George';
$names[4] = 'David'; $ Isim [4] = 'David';

As you can see, the parts of an array are all numbered, starting from 0. Gördüğünüz gibi, bir dizi bölümleri hepsi, 0 dan başlayarak numaralandırılır. To add a value to an array you must specify the location in the array by putting a number in [ ]. bir dizi size [] bir numara koyarak dizideki yerini belirlemeniz gerekir değerini ekleyin.

Reading From An Array Dizi An Okuma Gönderen

Reading from an array is just the same as putting information in. All you have to do is to refer to the array and the number of the piece of data in the array. bir diziden Okuma sadece yapmanız gereken tüm içeri bilgi koyarak aynı diziye ve dizi veri parçası sayısına bakın muhtemeldir. So if I wanted to print out the third name I could use the code: Ben de kodu kullanabilirsiniz üçüncü adını yazdırmak istedim:

n n
echo "The third name is $names[2]"; echo "üçüncü adı" $ isim [2];

Which would output: Hangi şekilde görüntülenir:

The third name is Steven Üçüncü isim Steven olduğunu

Using Arrays And Loops Döngüler kullanarak Diziler Ve

One of the best uses of a loop is to output the information in an array. Bir bir döngünün en iyi kullanan çıkış bilgileri bir dizi olduğunu. For instance if I wanted to print out the following list of names: Örneğin ben isimleri aşağıdaki listede çıktısını istiyorlarsa için:

Name 1 is John Adı 1 John
Name 2 is Paul Adı 2 Paul
Name 3 is Steven Adı 3 Steven olduğunu
Name 4 is George Adı 4 George
Name 5 is David Adı 5 David

I could use the following code: Ben aşağıdaki kodu kullanabilirsiniz:

$number = 5; $ Sayı = 5;
$x = 0; $ X = 0;
while ($x < $number) { ($ Sayı)
$namenumber = $x + 1; $ Namenumber = $ x + 1;
echo "Name $namenumber is $names[$x]
";
namenumber "Adı echo $" dır $
] isimleri $ x [;

++$x; + + $ X;
} )

As you can see, I can use the variable $x from my loop to print out the names in the array. Gördüğünüz gibi, ben x benim döngü dan dizideki isimlerini yazdırmak için değişken $ kullanabilirsiniz. You may have noticed I am also using the variable $namenumber which is always 1 greater than $x. Sen de her zaman 1 YTL'den büyük x. olduğu namenumber değişken $ kullanıyorum fark olabilir This is because the array numbering starts from 0, so to number the names correctly in the output I must add one to the actual value. dizi 0 dan, sayı çok doğru çıktı ben gerçek değeri bir eklemelisiniz isimleri başlar numaralandırma olmasıdır.

Part 5 Bölüm 5

In the next part I will show you how you can send e-mail using PHP. Gönderdiğiniz nasıl sonraki bölümde Ben e-mail PHP kullanarak gösterecektir.

Ekstra Ezsql Fonksiyonları

Üç ek işlevler ezSQL_mysql sınıf eklenir:

In /libs/extensions/ezSQL/mysql/ez_sql_mysql.php... / Libs / uzantıları / / mysql / ez_sql_mysql.php ezSQL In ...

The first checks if a table exists and returns true or false. İlk kontroller bir tablo varsa ve doğru veya yanlış döndürür. Call the function like this: Bu gibi işlev arayın:

PHP Code: PHP Kodu:
if( $h -> db -> table_exists ( 'tablename' )) { ... do something ... }
The second checks if a table is empty, ie it exists but has no rows. İkinci çekleri bir tablo boş, varsa ancak satır var yani. It returns true of empty or false otherwise. Boş veya yanlış başka gerçek döndürür. You can check if a table is empty like this: Tablo böyle boş olup olmadığını kontrol edebilirsiniz:

PHP Code: PHP Kodu:
if( $h -> db -> table_empty ( 'tablename' )) { ... do something ... }
The third function checks if a column exists and returns true or false. Üçüncü Foksiyon bir sütun varsa ve doğru veya yanlış döndürür. Call the function like this: Bu gibi işlev arayın:

PHP Code: PHP Kodu:
if( $h -> db -> column_exists ( 'tablename' , 'columnname' )) { ... do something ... }
Here's the full code for the functions: İşte fonksiyonlar için tam kod:

PHP Code: PHP Kodu:
/**
* Check if table exists
*
* @param string $table2check
* @return bool
*
* Notes: This is a custom function for Hotaru CMS
*/

function table_exists ( $table2check ) {
foreach ( $this -> get_col ( "SHOW TABLES" , 0 ) as $table_name ) {
if( $table_name == DB_PREFIX . $table2check ) {
return true ;
}
}
return false ;
}

/**
* Check if table empty
*
* @param string $table2check
* @return bool
*
* Notes: This is a custom function for Hotaru CMS
*/
function table_empty ( $table2check ) {
$rowcount = $this -> get_var ( $this -> prepare ( "SELECT COUNT(*) FROM " . DB_PREFIX . $table2check ));
if( $rowcount && $rowcount > 0 ) {
return false ; // table not empty
} else {
return true ; // table is empty
}
}

/**
* Check if table column exists
*
* @param string $table2check
* @param string $column
* @return bool
*
* Notes: This is a custom function for Hotaru CMS
*/
function column_exists ( $table2check , $column )
{
$sql = "SHOW COLUMNS FROM " . DB_PREFIX . $table2check ;
foreach ( $this -> get_col ( $sql , 0 ) as $column_name )
{
if ( $column_name == $column ) {
return true ;
}
}

return false ;
}

En Popüler Php veritabanı Sınıfı EzSql

ezSQL Veritabanı (ler kullanmak için gülünç) PHP betikleri içinde kolaylaştıran bir widgettır. It is fully documented with many easy to understand examples. Bu tamamen çok kolay örnekleri anlamak için belgelenmiştir. mySQL version available, Oracle coming soon. mySQL sürümü, Oracle yakında.

By : jv Gönderen: jv

ezSQL is a widget that makes it ridiculously easy for you to use database(s) within your PHP scripts. ezSQL Veritabanı (ler kullanmak için gülünç) PHP betikleri içinde kolaylaştıran bir widgettır.

This widget is a php file that you include at the top of your script. Bu widget size komut üst kısmında yer bir php dosyasıdır. Then, instead of using std php database functions listed in the php manual, you use a much smaller (and easier) set of ezSQL functions. Daha sonra, yerine std php veritabanı fonksiyonları php manuel listelenen kullanarak, kullanmak çok (daha küçük ve daha kolay) ezSQL fonksiyonlar dizisi.

ezSQL can dramatically increase development time and in most cases will streamline your code and make things run faster as well as making it very easy to debug and optimise your database queries. ezSQL ölçüde geliştirme zamanı artırabilir ve çoğu durumda kodunuzu aerodinamik ve işler daha hızlı hem çok hata ayıklamak kolay yapım olarak çalıştırın ve veritabanı sorgularını optimize olun.

The debug system draws a neat table showing exactly what your query was and results are. Hata ayıklama sistemi düzgün bir tablo tam olarak ne Sorgunuzla ve sonuçları gösteren çizer.

Please read through these examples to see how easy using databases can be using ezSQL. Bu örnekler üzerinden ne kadar kolay kullanarak veritabanları ezSQL kullanarak görmek için okuyun.

------------------------------------------------------- -------------------------------------------------- -----
Example 1 Örnek 1
------------------------------------------------------- -------------------------------------------------- -----

// Select multiple records from the database.. veritabanı .. dan / / Birden fazla kayıt
$results = $db->get_results("SELECT name, email FROM users"); $ Sonuç = $ db-> get_results ("SELECT ad, email FROM kullanıcı");

foreach ( $results as $user ) foreach ($ kullanıcı olarak sonuçlar)
{ (
// Access data using object syntax / / Access veri sözdizimi nesne kullanarak
echo $user->name; $ User-> isim echo;
echo $user->email; $ User-> email echo;
} )

---------------------------------------------------- -------------------------------------------------- -
Example 2 Örnek 2
---------------------------------------------------- -------------------------------------------------- -

// Get one row from the database.. / / Veritabanı .. dan bir satır alın
$user = $db->get_row("SELECT name,email FROM users WHERE id = 2"); $ User = $ db-> get_row ("SELECT ad, email FROM kullanıcı WHERE = 2" id);

echo $user->name; $ User-> isim echo;
echo $user->email; $ User-> email echo;


---------------------------------------------------- -------------------------------------------------- -
Example 3 Örnek 3
---------------------------------------------------- -------------------------------------------------- -

// Get one variable from the database.. / / Veritabanı .. tek bir değişken alın
$var = $db->get_var("SELECT count(*) FROM users"); $ Var = $ db-> get_var ("SELECT count (*) FROM kullanıcı");

echo $var; $ Var echo;


---------------------------------------------------- -------------------------------------------------- -
Example 4 Örnek 4
---------------------------------------------------- -------------------------------------------------- -

// Insert into the database / / Ekle veritabanına
$db->query("INSERT INTO users (id, name, email) VALUES (NULL,'Justin','jv@foo.com')"); $ Db-> sorgu ("INSERT INTO kullanıcıları (isim, e-posta) VALUES (NULL, 'Justin', 'jv@foo.com')"); id


---------------------------------------------------- -------------------------------------------------- -
Example 5 Örnek 5
---------------------------------------------------- -------------------------------------------------- -

// Update the database / / Güncelleme veritabanı
$db->query("UPDATE users SET name = 'Justin' WHERE id = 2)"); $ Db-> sorgu ("UPDATE kullanıcılar SET name = 'Justin' WHERE id = 2)");


---------------------------------------------------- -------------------------------------------------- -
Example 6 (for debugging) Örnek 6 (hata ayıklama için)
---------------------------------------------------- -------------------------------------------------- -

// Display last query and all associated results / / Ekran son sorgu ve tüm sonuçlar ilişkili
$db->debug(); $ Db-> debug ();


---------------------------------------------------- -------------------------------------------------- -
Example 7 (for debugging) Örnek 7 (hata ayıklama için)
---------------------------------------------------- -------------------------------------------------- -

// Display the structure and contents of query results (or any variable) / / Ekran yapısı ve sorgu sonucu (ya da herhangi bir değişken) içeriği
$results = $db->get_results("SELECT name, email FROM users"); $ Sonuç = $ db-> get_results ("SELECT ad, email FROM kullanıcı");

$db->vardump($results); $ Db-> vardump ($ sonuçları);


---------------------------------------------------- -------------------------------------------------- -
Example 8 Örnek 8
---------------------------------------------------- -------------------------------------------------- -

// Get 'one column' (based on index) from a query.. / / '(Endeksi) bir sorgu .. dan sütun alın
$names = $db->get_col("SELECT name,email FROM users",0) $ Isim = $ db-> get_col ("SELECT ad, email FROM kullanıcı", 0)

foreach ( $names as $name ) foreach ($ isim gibi isimler)
{ (
echo $name; $ Name echo;
} )

// Get another column from the previous (cached) query results.. / / Önceki (zula) sorgu sonuçlarından başka bir sütun .. alın
$emails = $db->get_col(null,1) $ Emails = $ db-> get_col (null, 1)

foreach ( $emails as $email ) foreach ($ e-posta olarak e-postalar)
{ (
echo $email; $ Email echo;
} )


---------------------------------------------------- -------------------------------------------------- -
Example 9 Örnek 9
---------------------------------------------------- -------------------------------------------------- -

// Map out the full schema of any given database.. / / Herhangi bir veritabanı .. tam şeması dışarı Haritası

$db->select("my_database"); $ Db-> select ("my_database");

foreach ( $db->get_col("SHOW TABLES",0) as $table_name ) foreach ($ db-> get_col ("SHOW TABLOLAR", 0) olarak $ tablo_ismi)
{ (

$db->debug(); $ Db-> debug ();
$db->get_results("DESC $table_name"); $ Db-> get_results ("DESC $ tablo_ismi");

} )

$db->debug(); $ Db-> debug ();


işte indime adresi

http://www.codewalkers.com/codefiles/179_ez_sql.zip

14 Temmuz 2010 Çarşamba

Tasarımcılar için Jquery Kullanımı

Bölüm 1

Biraz zaman anlamsal biçimlendirme konusunda komik değilim. Gerçekten biçimlendirme ki sonradan değiştirmek isteyebilirsiniz içine görsel ipuçları koyarak sevmiyorum. Sen o küçük semboller bizim sonunda koymak ya da bir cümlenin, edebi semboller olarak biz bazen artık kullanmak başından biliyorum.

Örnek olarak, ben acı beni biçimlendirme içine etiket metninin sonunda iki nokta üst üste gömmek zorunda bir form oluşturarak değilim. Biz neden bunu biliyor, bu yüzden bizim giriş kutusuna bir tür var "" daha önce, kullanıcının görünüm yapmayı durdurmak sadece biraz daha temiz ve daha kolay göze. bir tire veya virgül ile kolon değiştirebilirsiniz eğer ve burnundan solumak biz mark-up tüm sayfaları ve bir arama yapıyor ve üzerindeki yerini içine bu görsel ipuçları gömülü çünkü o zaman tabii ki müşteri bizi soruyor Bütün bir site kolon biraz vurmak olabilir ve kez en iyi özledim.
[Değiştir]
kurtarmak için CSS?

W3C gelen o düşünceli millet bize "en güzel sözde sınıfları: before" ve verdik ": sonra" biz eklemek veya önce veya bir elemanın sonra içerik prepend kullanabilirsiniz. Ama bu gerçekten yararlı araçlar Internet Explorer yer olmadığını anlar olabilir. Peki ne yapacağız?
[Değiştir]
JavaScript deneyin?

Hayır, ben bir tasarımcıyım. Ben alamadım, o çirkin, o erişilebilir değil, kötü kullanım için ve benim sayfa kabartmak gerekir. Hmm .... OK.
[Değiştir]
Efsanevi widget

Diyelim bir dakika orada biz biçimlendirme içine koyabilirsiniz bu efsanevi widget thingy's için rol. Bu çok kolay bir şekilde bizim bir programlama wiz olmak zorunda kalmadan akıllıca şeyler her türlü yapacak ve bizim güzel temiz biçimlendirme zarar vermez. Let's de bizim efsanevi widget thingy şuna benzer varsayalım: