database

Database Modeling Programs

Database Modeling Programs

DBDesigner 4 recommended

"DBDesigner 4 is developed and optimized for the open source MySQL-Database to support MySQL users with a powerful and free available design tool."

      Subscribe in a reader

Count the number of MySQL Queries

Count the number of MySQL Queries

How to count the number of MySQL queries used by your script

One way of optimizing your scripts that connect to MySQL databases is to determine how many queries to the database your script makes. If you would like to count the number of queries, you can write a script that will do so. You use this function in place of the regular mysql_query() function.

PHP Code:

<?php

function cnt_mysql_query($sql=FALSE)
{
static $queries = 0;
if (!$sql)
return $queries;

$queries ++;

return mysql_query($sql);
}

$sql= "SELECT 8+9";

      Subscribe in a reader

Introduction to using MYSQL with PHP

Introduction

PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a server-side scripting language that can be used on a host of webservers and platforms.

      Subscribe in a reader
Syndicate content