Showing posts with label COMPUTER - PHP. Show all posts
Showing posts with label COMPUTER - PHP. Show all posts

Friday, February 6, 2009

Mendapatkan Info Fields Dari Hasil Query

Pernahkah anda ingin mendapatkan info-info fields yang anda terima dari hasil select query MySQL pada PHP? Mungkin inilah jawaban bagi anda.

while ($i < mysql_num_fields($result)) {
    //echo "Information for column $i:<br />\n";
    $fields = mysql_fetch_field($result, $i);
    if (!$fields) {
        echo "No information available<br />\n";
    }
    echo "<pre>
            blob:         $fields->blob
            max_length:   $fields->max_length
            multiple_key: $fields->multiple_key
            name:         $fields->name
            not_null:     $fields->not_null
            numeric:      $fields->numeric
            primary_key:  $fields->primary_key
            table:        $fields->table
            type:         $fields->type
            default:      $fields->def
            unique_key:   $fields->unique_key
            unsigned:     $fields->unsigned
            zerofill:     $fields->zerofill
            </pre>";
    $i++;
}

Semoga bermanfaat

Saturday, December 13, 2008

The Only Problem With MySQL Server & Zencart

imageZencart, is well known as the php script to create online store. Wew, the only matter that bugging me is that Zencart cannot use MySQL Server with another port except 3306. However, this is the common port.

However, changing your MySQL port into 3306 will erase all the problems. 3

Tested with Zencart 1.3.8, XAMPP 1.6, and MySQL Server 5.02