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,

I merge firstname and lastname as fullname, but I can’t add this new calculated field in column list (it only adds to last) or can’t sort and search. Is there as fix about this?

Hi,

As new column is not available in database table so it is not possible to sort/search for that column. The new column is completely dynamically created so not possible. Though, I will try to add it in future version. Thanks

Hi – I wondered if you could provide some guidance on Image Upload… I’ve set my code as below, but nothing is being uploaded and no value is being inserted into the db field. I can’t see anything obvious in the apache error_log other than a PHP_NOTICE which I didn’t think was important, but I’ve added here in case it is?

The upload and upload_url config values are as per default.

My code: $pdocrud->fieldTypes("pic_url", "image");//change type to image // Thumbnail Trim the image and resize to exactly width and height given $pdocrud->thumbnailImage(100, 100); $pdocrud->tableColFormatting("pic_url", "image"); PHP error_log message: PHP Notice: Array to string conversion in {my path}/pdocrud/script/classes/bootstrap/template-form.php on line 7

All help very much appreciated

Nope – ignore all that!

The filetype error refers to the file I was selecting. I was selecting a .jpg file. I just tried to select a .png and the upload worked successfully!

So my question is now… how do I allow .jpg to be uploaded as images?

Hi – a further update – this is now solved. For anyone else that comes across this challenge, a quick summary about what was going on. It turns out that the file size was the problem. After some tweaking of my php.ini file, I thought I’d got it sorted, but then started to get max_file_size errors. This confused me as I made the values in php.ini very large and the jpg I was uploading was only 2.5MB… After some searching of the SimpleImage class I found it referenced a Max Size value, so I returned to the PDOCrud.php file in the classes directory. In that is the function to upload images. Part of the call includes a max file size value (in bytes) I tweaked this number and everything started working correctly.

I’ve included the code line below that you should change in case anyone else comes across this problem. Simply change the $maxSize value.

/** * Upload files using html file control. You can apply various restriction to make file uploading more secure. * @param string $fileName file upload control * @param string $fileUploadPath Path to upload file * @param int $maxSize Max size allowed, default is 1000000 * @param array $allowedFileTypes Allowed file types * * return boolean return true if file uploaded successfully else false */ function fileUpload($fileName, $fileUploadPath = "", $maxSize = 1000000, $allowedFileTypes = array()) {

Thanks for your detailed message and guidance for other user. Thanks

After deployment, I am getting the error where some this plugin is not able to find the certain files This is what it complains missing PDOCrud/,_script,_js,_comman.js+script,_plugins,_chosen,_js,_chosen.jquery.min.js.pagespeed.jc.EtkHpL6AIA.js

Yes. I can send you url but do not want to paste here. Can I send to an email id ?

You were right. This was not your code. It was google mod speed plugin. I had to clear the cache and now it works.

Ok..great. Thanks

Any news on the next update? 2 months ago you answered about the shifting fields in the inline edit “When you hide the checkbox and id column then it shows two column shifted. This point is resolved in latest version that will be uploaded for review tomorrow” I know tomorrow never comes, but when can we expect the update?

There are too many issues with this script to use in production environment. I want to use your features and migrate from xcrud, but can’t at the moment.

Today, I am uploading new version for review. Thanks

I am using index.php to do login validation.

$pdo_crud->addCallback("before_select", "beforeloginCallback");
// after login, we generally want to save the data in session
$pdo_crud->addCallback("after_select", "afterLoginCallBack");
//only required fields to be display on form
$pdo_crud->formFields(array("user_name", "password"));
///redirect to some page after login (optional)
$pdo_crud->formRedirection("http://mysite/my[page.php");
// set db table to your user table and call render function with select form
echo $pdo_crud->dbTable("user_pro")->render("selectform");

Even if I have incorrect credentials, it takes me to the next page. How do I fix this ?

Hi,

On the next page, you need to check whether session values are set or not to know whether user details are correct or not.

Thanks

hi, does it work with smarty?

Hi,

It;s not related to smarty. Smarty is different and this application is different. Smarty is basically template engine as you know and this application is basically crud generator. Thanks

Hi,

When i am using the inline edit btn option, the option always thinks the first column is a auto-increment column and not editable. So it moves the edit form one column is there a possible way to stop this?

Is it possible to depend 2 fields on 1, because if i depend more then one field to another it overwrites the second.

To author or users, any one compare this to XRUD ?

Hi, I dont compare my product with any other products, both are good. You can check yourself to know which fits more as per your requirement and only you can, best judge. Thanks

For info: have many more functions, bought and used both.

Hi can this script generate the data table code to add to my new build clientarea template to display their product they order, invoices ect?

Hi, Yes, it generates data table (crud). You can check demo and documentation for more details. :Let me know if you have any more questions. Thanks

OK dont know really about data table do you have any video tutorial? and can it work with existing data table?

How do you include previous years in the calendar that drops down on the date

Hi,

That is standard jQuery date picker. You can use arrow and dropdown to navigate it. To change it further, you need to modify code in javascript files. Thanks

Hello,

I have tried in vain to set up, I am new to php. This is what i have in my index.php.

<?php require_once ’/script/pdocrud.php’; ?> $pdocrud = new PDOCrud();//create object of PDOCrud Class echo $pdocrud->dbTable(“antenatal”)->render(); // call render function on database table

?>

NOthing is happening, how do i set up. I have already configured config.php

Hi,

Possible reason for this error can be 1. You forgot to add semicolon 2. You are missing quotes around the database.

You can set it up once on server and I will do required settings that you can use or you can try with demo once also.

Hello,

This is what i have in my index.php

<?php require_once “script/ pdocrud.php”; $pdocrud = new PDOCrud();//create object of PDOCrud Class echo $pdocrud->dbTable(“antenatal”)->render(); // call render function on database table ?>

and this is the error i get

Notice: Use of undefined constant “script – assumed ‘“script’ in C:\xampp\htdocs\vbmc\index.php on line 1

Notice: Use of undefined constant pdocrud – assumed ‘pdocrud’ in C:\xampp\htdocs\vbmc\index.php on line 1

Warning: Division by zero in C:\xampp\htdocs\vbmc\index.php on line 1

Notice: Use of undefined constant php” – assumed ‘php”’ in C:\xampp\htdocs\vbmc\index.php on line 1

Warning: : failed to open stream: No such file or directory in C:\xampp\htdocs\vbmc\index.php on line 1

Fatal error: require_once(): in C:\xampp\htdocs\vbmc\index.php on line 1

Hi,

This is not our script related errors…these all are php related issues if you can check. For example, it is constant php error and all that….

You are trying to run file directly in browser as I can say from the “C:\xampp\htdocs\vbmc\index.php” it is should something like this

http:\\localhost\vbmc\index.php

You need to run server and open it like this. I understand you are new to php but these are basic steps for php and it is not even related to this script.

I hope it’s clear to you now. Thanks

How do I add simple login mechanism or allow only selected users to access the application ?

Hi,

For login, you can use following example.

http://pdocrud.com/demo/pages/login-demo-example

PDOCrud provides support for the crud related operation but it doesn’t have role based feature. You need to add specific code for that.

I guess I will make question more explicit. I want to limit users who can access the application. A simple user name/pwd will do. As per documenation “You can easily create complete login form and add callback functions to save session related data to check login on various pages ”. I can set up a table with proper credentials. I want only authorized users to access any page. How do you suggest we do it ?

Hi,

Yes, the login example shows how to create callback function and save session related data. After saving data in session, then you need to check session value in each page to allow access or not as per role and user Id.

Thanks

Hi, Is it possible go to my own form when i click in action icon? I mean that i have forms with distinct layouts and would like to use them with pdocrud. Thanks. Forgive the bad english.

Hi,

You can use something like this.

http://pdocrud.com/demo/pages/action-buttons

redirect to your forms on button click. Thanks

Yes, very good, i’m stupid. What about addbtn? I write md5(password) to table and standard form doesn’t allow this operation. The standard input form also fails when the mysql field type is enum (UserDep enum(‘Commercial’,’Gate’,’CustomerService’)). The dropbox is empty.

Found the dropbox soluction: fieldDataBinding(“UserDep”, array(‘Commercial’,’Gate’,’CustomerService’), ””, ””,”array”)

How to debug PDOCrud?

I found that the page has problem with Language since it is not show in button left in export section.

Language file is exist on the server.

Thank you

Hi,

To set language file, you need to set the language name in config file.

http://pdocrud.com/documentation/#!/configuration_settings

Thanks

Hi is it only possible to use a select field for the fieldDependent function because if i use a text field it wont fill it.

You can set the value of the text field also.

Please check

http://pdocrud.com/demo/pages/set-field-value

Thanks

Hello, I use PDO Crud in a secure area (admin area) with a session (secure_session_start ();) and PDO Crud uses @session_start (); The following error message occurs:

Notice: Undefined index: TawYmhLU6J in /homepages/xxxx/htdocs/xxxxxxx/script/classes/PDOCrudAjaxCtrl.php on line 9

Fatal error: Uncaught Error: Call to a member functionRender () on boolean in /homepages/xxx/htdocs/xxxxx/script/classes/PDOCrudAjaxCtrl.php:19 Stack trace: # 0 / homepages / xxx / htdocs / xxxxxx / script /pdocrud.php (18): PDOCrudAjaxCtrl-> handleRequest () # 1 {main} thrown in /homepages/xxxx/htdocs/xxxxx/script/classes/PDOCrudAjaxCtrl.php on line 19

Could you please help me?

Regard Peter

What do I have to change?

You need to change session code in the PDOCrud.php page. Thanks

What do I need to change? In the pdocrud.php, the code is @session_start ();

In the admin-arena is the code “secure_session_start ();”

What i need is, when the i select a personname (unique) in the form it fills automaticly the other data in the form (data that is in the same table like adress, age etc). Is there a function for that already or do i need to make a function for that by myself.

i think i can sort this out with the fieldDependent function.

Hi. I am having some problems when running the script. It creates the diferent tables however it doesnt load the css or javascript files. I am working with Xampp. I copied the script folder and edited the config.php file. I have made a couple of tests with the insert form and it works well. However it doesnt load the css files.

Hi,

You might have not set url settings correctly in config file. Please check that. Thanks

Hi,

You might have not set url settings correctly in config file. Please check that. Thanks

Hi,

I want to change returned content of a column in database table, not same as data returned from database, how can i do this.

Ex: data returned from database was 1, and i want display it to 2 or something else.

And one more question, i want to join others table and display data from that table in crud, but i tried to call columns name, it was failed.

Regards.

Yeah, one of my question got answer.

i have two table:

- users (first_name, last_name, username)

- user_meta (birthday, country)

And i want to join 2 tables above and display all columns. My problem was just can use:

$pdocrud->crudTableCol(array(‘first_name’, ‘last_name’, ‘username’));

couldn’t use $pdocrud->crudTableCol(array(‘first_name’, ‘last_name’, ‘username’, ‘birthday’, ‘country’));

or even: $pdocrud->crudTableCol(array(‘first_name’, ‘last_name’, ‘username’, ‘user_meta.birthday’, ‘user_meta.country’));

Regards

please help ?

HI,

The grid shows columns of the main table by default. Just to explain why It is not allowed to show other table data because it can be a left join where multiple entries can match same entries. If you want to show the data of other table then you need to use the callback functions. Thanks

Can I disable Print CSV, Excel and CSV export ? I want team members to edit data but not export them for any reason.

Yes, you can disable all these options using config settings. Thanks

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