getredhawkstudio does not currently provide support for this item.

14 comments found.

Does this do multiple table queries and handle joins?

You can use multiple tables queries and joins: $data->select(“car.color, paints.color”, “cars, paints”, “car.color = paints.color”);

For complex queries you can simply use the query function: $data->query(“SELECT * FROM …”);


I give up! :) I can get Update, delete and Insert working but not Select….

Simply not displaying any data at, any hints ?

to display the data you have to do this:
$data = new Database();
$data->select(”*”, “tablename”, ” `email` = ‘’ “);

Can I connect to two or more databases ?

Email me the code, I’ll fix it.

the function “getResults” returns the complete result array, it wont work in a loop, if you want your script to work, change the getResults function in database class to this:

public function getResults(){
   return mysql_fetch_assoc($this->result);

Now it will work in your loop.

thanks. Excellent technical support!

check your email.

Is this using the mysql improved class or pdo? Please not the old pretty much deprecated… mysql_connect etc

This is the old one, it works on all PHP versions if you are concerned about that.

how do you close a connection using this script?

you can simply use the mysql_close to close the connection, it doesnt really matter with new versions of PHP.

is there anyway to perform a sum function?

$db_cct = new Database(); $paid_count_today = $db_cct->select(” sum(paid_amount) ”, ” database ”, ” creationdate > NOW – INTERVAL $interval; “);

how do i display the result of sum(value)

as echo $query is just bringing up the number of rows found… not the sum.

try the query without select function and see if it gives the right results, you can do something like this: $db_cct->query(“SELECT * FROM …...”);

$count = $data->select(” * ”, ” table ”, ” `ID` = ’$ID’ ”, “ORDER BY UserName DESC”);

i need “ORDER BY” how to write “ORDER BY”

Write after the where clause, there is not 4th argument, example:

$count = $data->select(” * ”, ” table ”, ” `ID` = ’$ID’ ORDER BY `UserName` DESC”);

thank you. worked.

I am trying to order a list in DESC return but it doesn’t seem to be working. Can you tell me if this is how you write that code?

I am gathering data from all users with a user level of 1 but want it to display in order based on the first name…

$count = $data->select(” * ”, ” users ”, ” `userlevel` = ‘1’ ”, ” ORDER BY `fname` = ‘DESC’ ”); “);

you instructions are not clear on ORDERING so I am only guessing at this.

You are using a fourth argument, you have to add the order by in the third argument, like this: $count = $data->select(” * ”, ” users ”, ” `userlevel` = ‘1’ ORDER BY `fname` = ‘DESC’ ”); Also there should only be one ); at the end, not two.

Good day Author,

Nice product! A pre-sales question please: the description reads “Use every feature of MySQL in PHP without writing a single query” ....but when I read te documentation, it seems quite some knowledge of PHP and SQL is needed. Could you explain the ease of use a bit more for us?

Thanks and have a beautiful day! Khoel

Yeah you actually need a little knowledge of the sql if you are writing more complicated queries, for insert, updates, select, delete queries you dont have to know much about sql, you just need to know the names of the tables and fields.

Remote Databace Connection RESOLVED

Will this script allow my website to write data into the database as well as read it and show it to my members?

Yes, it will do all the operations a regular sql query can do.

How do you use “AND” and “OR” functions when fetching items that match two or more criteria? None of that is included in the documentation.

You can directly write the AND and OR functions in the where string, example:
$count = $data->update(" users ", $arr , " `user`= 'john' AND `status` = 'active' ");

Do you have any plans to upgrade this to SQLi or PDO since SQL is now depreciated and the code will not work for many secure databases anymore?

Hi, This is an old product, I am not even supporting it right now. I will take it down in a few days. Sorry about that…