ddeveloper

ddeveloper supports this item

Supported

59 comments found.

MWNS

MWNS Purchased

Hi, I like your script, I have a question, in the PDF Export option how can I do to place the results in different PDF places? it’s possible? To export the pdf can I use the where clause?

MWNS

MWNS Purchased

i solved, thank you! well, not quite, can I distribute the result of a query in exact PDF sites?

Ok..Thanks

MWNS

MWNS Purchased

hi! Any way to close connections?

Hi, PHP PDO doesn’t require close connections like mysql. Thanks

MWNS

MWNS Purchased

thank you! cool!

I have a wordpress multisite network with a lot of sub-sites (> 1000 sub-sites). Is your script capable to modify automatically every user of the database for each of the subsites, please?

Hi,

script is database abstraction helper class so basically it helps in database related operation. You can write queries using it and perform the operation but it doesn’t do anything automatically. Thanks

Thanks, I understand. But I do not know how to do SQL queries, will your plugin help me doing that? And do that easily?
(“Do that”, I mean: to modify every user of the database for each of the subsites in my multisite network).

You need to understand what kind of operation you are going to do in sql to use same in the pdomodel without writing sql, for example, if you are going to perform update sql query “update table_name set user_birth_date=’’ where user_id=’’” then you can do same in pdocrud by passing tablename and user column details in pdocrud.

Thanks

MWNS

MWNS Purchased

love this script! :) great job!

MWNS

MWNS Purchased

Hi, how can I use orderByCols with asc and desc. thank you

Example of order by asc

$pdomodel->orderByCols = array(“firstName”);

example of order by desc

$pdomodel->orderByCols = array(“firstName desc”);

MWNS

MWNS Purchased

thank you

MWNS

MWNS Purchased

Hi, as for sql injections, do you have that controlled in your script?

we are using PDO with proper data binding so it’s safe from sql injection. Thanks

MWNS

MWNS Purchased

Thank you

Hi, Every file from demo folder that I access gives me this error: Fatal error: Uncaught Error: Call to a member function prepare() on null in D:\EasyPHP\eds-www\PDOModel\script\PDOModel.php:446 Stack trace: #0 D:\EasyPHP\eds-www\PDOModel\demo\html-export.php(19): PDOModel->select(‘emp’) #1 {main} thrown in D:\EasyPHP\eds-www\PDOModel\script\PDOModel.php on line 446 and I see that all errors are related to this code: $stmt = $this->dbObj->prepare($this->sql);

Am I doing something wrong?

I am using Nginx 1.12.0 PHP 7.1.3×86 or PHP 5.6.30×86 MySQL 5.7.17×86

Hi,

It is giving error that suggest that object is not created. Please check whether it is able to connect to database or not. Make sure all credentials are correct. In case of still issue, give me FTP and db access via email, I will check. Thanks

I have used this code here https://pastebin.com/2c6iffAP to test the connection to db (here is a screenshot with the results http://prntscr.com/ewt02c). If I use mysqli to connect to db it works but not with pdo. Now I’m wondering, knowing that in both cases I didn`t use a pass to connect to db, can pdo connect to a db with no pass?

Hey there,

How can i check if there is already a row with a specefic name? Sort of Count()...?

Greets, Cherimo

Hi,

I am not able to understand your question. Please explain. Just to let you know for complex queries use executeQuery function.

Thanks

Heyy,

For an example, this how i check if a row exist.

$dbPDO->where(“name”,$_POST[‘form_name’]); $dbPDO->where(“id”,$getID,’!=’); $result = $dbPDO->select(“forms”);

if(count($result)...

Is there an easier way?

Hi,

You are doing that correctly. No shortcut method available for that. Thanks

does the table generated has pagination?

Hi,

It is basically query helper so it doesn’t have many function related to table and pagination. I think you should check this one

https://codecanyon.net/item/pdocrud-advanced-php-crud-application-database-management-system/17674879

Thanks

MWNS

MWNS Purchased

Hi, I’ve already asked you something similar, but I want to confirm, to prevent sql injection is it enough to apply the way you use your script in the examples you have? Or should I do something else? thank you

Hi, Yes, it is using PDO method to connect to database and as mentioned in PDO connection, it is secure against sql injection.

Thanks

MWNS

MWNS Purchased

Thank you

HELLO! I need a plugin so new users can register and then from the website create a table that only this user can have access, the table should be created uploading a Excel file to mysql dB. Same for many users. Can I have this with this plugin?

Hi, This feature is not available in this script. Thanks

MWNS

MWNS Purchased

Hi, how can I use RAND in orderByCols? thank you

MWNS

MWNS Purchased

Hi, thanks for your reply, but that does not work

$this->db->backticks = ””; $this->db->orderByCols = array(“rand()”); $this->db->limit = “0,1”; $results = $this->db->select(“table”);

Works like this:

$results = $this->db->executeQuery(“SELECT * FROM table ORDER BY RAND LIMIT 0,1”);

why?

Hi

check like this also $this->db->orderByCols = array(“rand()”);

try to print query, this will explain. Thanks

thank you!

Hello! this looks great, I have a pre-sales question. I need to give a front end to my wordpress registered users so they can upload a xls or cvs file into a table in my mysql db. Will I be able to give that capability to my users with this system? thanks!

Hi,

I have replied to your similar question in other message thread.

Hello! Your script is great, I have another question, how can I do to put column names in the first row when i export an excel file?

Hello I have a question, I would like to know if the class allows working with stored procedures in mysql.

Thank you so much!!

Hi,

There is no separate function for that. You can use execute query function to call stored procedure.

Thanks

Hi, my licence ist 723fbda4-6a4e-4c99-8918-1f4b6f421418

I have the problem to update data like

$updateData = array(“validto”=>$validto); $pdomodel->where(“person_id”, $index); $pdomodel->where(“club_Id”, $currentClub); $pdomodel->where(“validto”, NULL); $pdomodel->update(“person_club”, $updateData);

I think the problem is column validto. It is not updating.

My question: How kann I select NULL Values in WHERE condition?

Kind Regards Marcus

Hi,

As per sql standard,

Because NULL stands for UNKNOWN, and when you compare a value with UNKNOWN, the result will always be false.

that’s why it is not working.

Thanks

good morning

I have a question is it possible to use avg function with this class??

thanks!!

Good Morning

Yes, you can use avg function also.

Thanks

bbanelli

bbanelli Purchased

Greetings,

I absolutely love your PDOModel product (although I have previously purchased PDO Crud, which I don’t really need but you definitely deserve that money after I’ve discovered PDOModel!), and I am so pleased with JSON export ability which is the one I exclusively use. However, here’s my question/concern:

Can function

arrayToJson($jsonArray);

handle anything else but strings? Since my query returns floats, integers and strings, but JSON only exports strings even though database values are different. Is there an option to handle that situations (especially annoying with id’s, for example) or can you implement that in future versions?

Basically, this is the only thing I find as a drawback to your script so far, great work!

With my best,

Bruno

bbanelli

bbanelli Purchased

Greetings,

<?php require_once 'script/PDOModel.php'; $pdomodel = new PDOModel(); $pdomodel->connect("test.sqlite3", "", "", "test.sqlite3", "sqlite", "utf8"); $result = $pdomodel->executeQuery("SELECT * FROM foo"); echo $pdomodel->arrayToJson($result); ?>

This is database structure: http://imgur.com/a/Ys5OD (https://www.pci-z.com/db/test.sqlite3) (integer, text and real) and here’s the output:

https://www.pci-z.com/db/test.php (for some reason pasting JSON in comments doesn’t work, so here’s the link to the output)

As you can see, “id” and “fl” are both represented as strings in JSON, whereas they should be integer and float respectively.

Hi

I have understood the issue. It depends on php version and database you are using.

https://stackoverflow.com/questions/1390983/php-json-encode-encoding-numbers-as-strings

Please refer to above article for better explanation.

Solution: If you are using php > 5.3 then you can do following change in the function arrayToJson() line 1320 in pdomodel.php return json_encode($jsonArray, JSON_NUMERIC_CHECK );

I will add that in future version also.

Thanks

bbanelli

bbanelli Purchased

I am using PHP above 5.3 and your fix works like a charm! Brilliant product, once again, thank you so much!

I don’t get any results when I run:

$result = $pdomodel->select(“nnj_members”);

I just get a blank page.

Hi

have you created the object of pdomodel and “nnj_members” table exists? please enable error reporting also to see actual issue. In case of still issue, you can contact me.

Thanks

by
by
by
by
by
by