ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: STEVE on July 06, 2022, 10:35:44 pm

Title: CRUD - Create, Retrieve, Update, Delete to Database
Post by: STEVE on July 06, 2022, 10:35:44 pm
Dear Paramvir,

The product example explained in tutorial doesn't update/delete/create data to the table. 
It can only retrieve data from the database. I just followed your tutorial but I don't know where I made mistakes.

please check my codes in the attachement as below

Best Regards,
Steve.
Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: paramvir on July 07, 2022, 09:59:59 am
There are couple of online CRUD examples to follow as per your requirement:

https://paramquery.com/pro/demos/editing_batch

https://paramquery.com/pro/demos/editing

https://paramquery.com/pro/demos/editing_instant
Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: STEVE on July 07, 2022, 06:45:59 pm
Dear paramvir,

I am beginner not like you.  It is really hard and tough.  Almost I was to cry.

Would you give me these sample files?

Why didn't you post the sample files on these pages.  I was always confused whenever I was reading it.

Please be nice to me.  I don't know at all.  Please save the time.

Best regards,
Steve.   
Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: STEVE on July 07, 2022, 08:01:04 pm
It can only retrieve data from the database.

please see the attachment.
Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: STEVE on July 07, 2022, 09:12:40 pm
It is also same results.

It can only retrieve. CUD is not working.

please see the attachment.


Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: paramvir on July 08, 2022, 10:00:26 am
Dear Steve

Please check this comment in the source code. (saveauto.php)

Code: [Select]
//JSON.stringify not required for PHP
list: JSON.stringify( gridChanges )

so change your source code to

Code: [Select]
list: gridChanges

instead of

Code: [Select]
list: JSON.stringify( gridChanges )
Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: STEVE on July 08, 2022, 05:30:51 pm
Finally, It is working now!!!!

Thank you  Paramvir.

Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: STEVE on July 09, 2022, 01:21:22 pm
Hello paramvir,

I changed some lines of the source code of products.php. The changed parts were related to a table.

I could see the data but I couldn't update/delete/insert.

I got the error message from the log folder.

Quote
   VirtualProtect() failed [87] parameter is wrong.

I wan to know how to debug this problem.   and how to see the data which is producing through each line of the source code.

I am going to attch the source codes.  Please see below.

Best regards,
Steve.
Title: Re: CRUD - Create, Retrieve, Update, Delete to Database
Post by: paramvir on July 11, 2022, 10:17:40 am
It's your environment specific issue.

Please use xdebug to debug your code and find out which line is causing the error.