3 comments found

$sql = $db->sql_query("SELECT * FROM users"); $row = $db->sql_fetchrow($sql); print_r($row);

My database contain 3 rows. But it only show first record. Why? and how to add a variable to contain all record of fetch rows

Megatpl

Hi
Please use loops (while)

EX:

$sql = $db->sql_query("SELECT * FROM users");
while($row = $db->sql_fetchrow($sql))
{
    print_r($row);
}

Let me get this straight. Rather than creating an abstract class and including sub-classes for each RDBMS, you opted to break them all into individual classes just to create more revenue?

Stay classy.

Hi It seems to be a very nice script but can one ‘FILTER’ records?..ie I have 1 office with employees in 3 cities A, B, C and I want only view employees in city B…is it possible? or you have an example of it?

Regards

Megatpl
Hi,,,
Yes, there are conditions put in the query Example
$sql = $db->sql_query("SELECT * FROM users");
// OR
$sql = $db->sql_query("SELECT * FROM users WHERE `cities`='A'");
// OR
$sql = $db->sql_query("SELECT * FROM users WHERE `cities`='B'");
// OR
$sql = $db->sql_query("SELECT * FROM users WHERE `cities`='C'");

by
by
by
by
by
by