Code

Discussion on PDO Crud – Advanced PHP CRUD application (Form Builder & Database Management)

Discussion on PDO Crud – Advanced PHP CRUD application (Form Builder & Database Management)

Cart 2,301 sales

ddeveloper supports this item

Supported

2608 comments found.

Hi there,

i bought your tool today.

First i followed your “config-instructions”...

From this point on:

That’s all !!!! Only these settings are required to start your project. Apart from these required settings, there are various settings to ease out various operations of PDO CRUD. You can find all these settings here

Now you can create any php file and include the following file.

require_once “script/pdocrud.php”; Please note that if script folder is at different location then you need to provide path till script folder, For example require_once “abc/script/pdocrud.php”;

You can create an object of PDOCrud class and start calling functions to do required work. For example,

$pdocrud = new PDOCrud(); echo $pdocrud->dbTable(“table_name”)->render();

i created a new php file including your code snippets.. but when i navigate / call the php .. i got a blank page..

Can you tell me what i`m doing wrong?

Best wishes…

Hi

Please make sure that your dB table have primary key. I have checked your url. It seems that you have incorrect url in the config [“script -url”] . It must be path till the script folder. It doesn’t include script folder.

Also make sure that your new created files must reside outside the script folder

Ok.. now i have got new errors, but it seems that the “basic structure” is working:

Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /home/sites/site100005514/web/pdocrud/script/classes/PDOModel.php on line 1009

/home/sites/site100005514/web/pdocrud/script/classes/templates/bootstrap/template-table.php on line 51 ” />

Hi, when will the new version be released?

Can i connect this to a microsoft SQL Database Server?

Hi

Yes you can

hi, multi upload option ?

Yes available

we having issue withdeprecated function strtoupper at every demo page

https://crud.indianic.in/demo/pages/index

I am using PHP version 8.1

what should I do to remove that, I also notice that at each page CSS not applying on tables and data

Hi

We are releasing a new version with this deprecated msg removed. For now you may hide it. Thanks

hello

how can I make the code return array not html ??

thanks

how to upgrade to bootstrap 5 ??

Hi

You can use the pdomodel(raw data) to get output as array.

Hi,

Regarding the csv or excel bulk import function, do you have to first upload the file to the upload folder or can that be part of the task? and can duplication validation be part of the import process? Sure all of that is possible but it’s just knowing how :)

Thanks in advance.

I’ve figured this out, another question would be how could you make dynamic pie charts through say a date range and selecting a customer and then have the option to save to pdf or png.. another thing to figure out.

error funcrion multiTableRelation(“ip”, “ip”, $pSection);

SQLSTATE42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

Hi ddeveloper,

I have used your library last period. I think, very useful, but containing many bugs.

I have solved a lot of bugs by myself and added some functionality. Since the support is very limited in my opinion, it would be desirable if this project would just be open source on github so that we as users can help you and each other and improve the library.

Can you give me your opinion about this?

regards, Hugo

if i need it like json not html to used it for api how i can do it ?? thanks

There is currently no option for JSON. Thanks

Hello ddeveloper :-)

I purchased PDOCRUD and love it! Thank you for a great program Have a couple of questions… 1) Is there any way to export the data on a filtered display list so I can use it on another (PHP) page?

2) How can I add a Clear search / filter button?

3) when using Tags can one enable linking to see all records with that tag? ( ie: animals)

4) for some reason PDF Export does not work - am I missing something? - works on the demo. pages on my site…

THANK YOU again for a great tool!!!

Jorge

8 days with no answer! —Mmmm… is this support?

1. Export can be done in pdf or Excel. On the other page you may use similar query 2. It’s already on the top of the page 3. You can search for that 4. Please check the tcpdf library used

Hi tried for a day or two in development environment, but not used it.

Now I installed in https://xxxxx.rcom.cccc/demo/pages/ – But script is not working – The left menu links – they return blank 404 error pages .What should I do to make them work

I think your licence validation is blocking the script. Because before putting licence details it showed just without any links. After that it tried to show fully but some block makes it go back to that. If the problem or error is not because of licence checking system of yours, then I am happy to take service. Is your licence allowing development and production ? Is there change of domain for the licence possible?

If I buy support and you say purchase another licence, then it will be awkward. So please check and let me know.

@dhuerta: thx for your quick response :-) and YES i want to show or edit the numeric value in edit fields. In the grid i followed your suggestion, and it works perfect. If you like, we can send feedbacks by e-Mail (olaf@mannack.de).Thx.

@omanaco do you want to show the numeric value in the edit field?

or on the grid?

for the grid you can do the following

$pdocrud = new PDOCrud(); $pdocrud->addCallback("format_table_data", "formatTableDataCallBack"); echo $pdocrud->dbTable("employee")->render();

and in pdocrud.php the following callback

function formatTableDataCallBack($data, $obj) { if ($data) { for ($i = 0; $i < count($data); $i++) { $data[$i]["Zip"] = number_format($data[$i]["Zip"], 2, ',', ''); // here depends on the format you want to give it } } return $data; }

Here is an example of how it would be to put it in the edit field with the formatted value

$pdocrud = new PDOCrud(); $pdomodel = $pdocrud->getPDOModelObj(); $id = 14; // here you could receive it as $_GET["id"]; $query = $pdomodel->executeQuery("SELECT * FROM employee WHERE id = '" . $id . "' "); $format = number_format($query[0]["Zip"], 2, ',', ''); $pdocrud->setPK("id"); $pdocrud->fieldDataAttr("Zip", array("value" => $format)); echo $pdocrud->dbTable("employee")->render("EDITFORM", array("id" => $id));

@dhuerta29: Do you have experiences with number_format in pdocrud edit-form? I need currency-value (e.g. 1.234,56 EUR) format in numeric fields in an edit-formular. In the view grid formulars i use callback function “formatTableData”. Any idea? Thx.

@dhuerta29: you are my hero! It works perfect. Thank you so much for your help.

For all those who want to learn how to use pdocrud, I know all its secrets and I guarantee that everything can be done.

how I can show in a column of the grid one calculated value? I have the field ‘year_birth’ and I want to show not the date, I want to show how old are (years).

year_birth -> is the data field 2022 – year_of_birth -> this must show in grid

Thanks in advance,

waiting…..

Hi

You can format the value of data using table format options

I use date fields with this format: dd/mm/yy and I change in config file, but if I generate a data table don’t work or if I edit one date field, don’t show well. How I can do?

If I click on one file of data, down open all the fields for view or edit, but if I close this, open a new data table and in the page I see two data tables. How I can solve this error?

waiting

I m not able to understand this.please explain more

I tried adding where clause in your update function in pdomodel, still where clause is not working when doing trigger operation. can you clarify whats the issue ??? Your function did not have wheredate i added it.

public function update($dbTableName, $updateData, $whereData) {

try {
        if ($this->dbTransaction && $this->dbRollBack  true)
            return;
}
if ($this->dbTransaction && $this->dbTansactionStatus  0) {
        $this->dbObj->beginTransaction();
        $this->dbTansactionStatus = 1;
    }
    $this->sql = $this->getUpdateQuery($dbTableName, $updateData, $whereData);
    $stmt = $this->dbObj->prepare($this->sql);
    $stmt->execute($this->values);
    $this->rowsChanged = $stmt->rowCount();
    $this->resetAll();
} catch (PDOException $e) {
    if ($this->dbTransaction == true) {
        $this->dbRollBack = true;
        $this->dbObj->rollBack();
    }
    $this->setErrors($e->getMessage());
}

your update function is like this

public function update($dbTableName, $updateData) {
try {
        if ($this->dbTransaction && $this->dbRollBack  true)
            return;
}
if ($this->dbTransaction && $this->dbTansactionStatus  0) {
        $this->dbObj->beginTransaction();
        $this->dbTansactionStatus = 1;
    }
    $this->sql = $this->getUpdateQuery($dbTableName, $updateData);
    $stmt = $this->dbObj->prepare($this->sql);
    $stmt->execute($this->values);
    $this->rowsChanged = $stmt->rowCount();
    $this->resetAll();
} catch (PDOException $e) {
    if ($this->dbTransaction == true) {
        $this->dbRollBack = true;
        $this->dbObj->rollBack();
    }
    $this->setErrors($e->getMessage());
}

this my trigger operation

$pdocrud->setTriggerOperation(“attendance”, array(“status” => array(“type” => “fixed”, “val” => “PRESENT”)), array(“studentid”=> array(“type” => “array_data”, “val” => “studentid”)), “update”, “after_insert”);

i have also tried public function update($dbTableName, $updateData, $where) { and public function update($dbTableName, $updateData, $where = array()) {

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey