jQuery UI Widgets Forums Scheduler CRUD with php/mysql

This topic contains 28 replies, has 2 voices, and was last updated by  ritttchy 8 years, 11 months ago.

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
  • CRUD with php/mysql #76861

    ritttchy
    Participant

    Hello,

    Is it possible to do CRUD with php mysql on the scheduler if so thank you to help me if possible.

    CRUD with php/mysql #76864

    Peter Stoev
    Keymaster

    Hi ritttchy,

    The Scheduler raises appointmentDelete, appointmentAdd and appointmentChange events when there is some change regarding appointments which means that when you bind to these events, within the event handlers you can use the jQuery’s AJAX method and send the updated data to your PHP. In your PHP code, you can get the changes and make the MySQL function call with the updated data.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    CRUD with php/mysql #76876

    ritttchy
    Participant

    Thank you
    It works with different methods, I have only a passing-standing problem in ajax. How to set the start and end date fields in the SQL for insertion Date format. In addition the display must match the type size French Day DD / MM / YYYY HH: MM

    CRUD with php/mysql #76883

    Peter Stoev
    Keymaster

    Hi ritttchy,

    For SQL Insertion of dates, you can look at: http://stackoverflow.com/questions/12957635/sql-query-to-insert-datetime-in-sql-server

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    CRUD with php/mysql #76889

    ritttchy
    Participant

    Hello,

    The problem is not just inserting SQL but the date format is sent in AJAX type invalid Date: Wed October 14, 2015 0:30:00 GMT + 0200 (CEST)
    My question is how to change the date format for the passage of datas in AJAX

    Thank you

    CRUD with php/mysql #76890

    Peter Stoev
    Keymaster

    Hi ritttchy,

    That’s as far as I see a JavaScript Date object. Anyway, appointments work with jqxDate objects. The jqxDate object have toString() method. The toString() method has “format” argument which you can use to pass the DateTime format you wish and it will return you a DateTime string in a format of your choice. By default it returns yyyy-MM-dd format. For more information about the toString() method of our jqxDate object, please refer to: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxscheduler/jquery-scheduler-getting-started.htm

    Hope this helps.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    CRUD with php/mysql #76914

    ritttchy
    Participant

    Re.

    I arrive well to insert an appointment in database but when I pass the mouse over it I have a message: “Uncaught TypeError: Can not read property ‘jqxAppointment off undefined”
    and it is impossible to edit the appointment because the dialog box does not open.

    Thank you

    CRUD with php/mysql #76916

    ritttchy
    Participant

    Information for the appointment appointmentChange event does not return the new values but only the old values

    CRUD with php/mysql #76920

    Peter Stoev
    Keymaster

    Hi ritttchy,

    Ok, send me please jsfiddle.net demo or demo like that https://www.jseditor.io/?key=jqxscheduler-events which demonstrates this because I cannot reproduce it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    CRUD with php/mysql #76934

    ritttchy
    Participant

    Ok, I found the solution to display the new values for appointmentChange event:
    $(‘#scheduler’).on(‘appointmentChange’, function (event) {
    console.log(‘— appointmentChange —‘);
    var args = event.args;
    var appointment = args.appointment;
    var id = appointment.id
    var from = new $.jqx.date($(‘#scheduler’).jqxScheduler(‘getAppointmentProperty’, appointment.id, ‘from’)).toString();
    var to = new $.jqx.date($(‘#scheduler’).jqxScheduler(‘getAppointmentProperty’, appointment.id, ‘to’)).toString();
    ………
    });

    However, I have another problem on resourceId with JSON datatype resources: Uncaught TypeError: Can not read property ‘length’ of undefined.
    Using your demo and then type datas table it works but not in JSON format. Is this a BUG or not?

    CRUD with php/mysql #76935

    ritttchy
    Participant

    I have another question, is it possible to add resources from another source than an appointment with a foreign key SQL?

    CRUD with php/mysql #76944

    Peter Stoev
    Keymaster

    Hi ritttchy,

    The resources object have a different source object so it is only on your logic what source they would use. If you think there is some issue on our side then provide jsfiddle or jseditor example like that: https://www.jseditor.io/?key=jqxscheduler-with-ribbon.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    CRUD with php/mysql #76975

    ritttchy
    Participant

    Thank you but I asked you a question before to validate the use of the resources JSON :

    However, I have another problem on resourceId with JSON datatype resources: Uncaught TypeError: Can not read property ‘length’ of undefined.
    Using your demo and then type datas table it works but not in JSON format. Is this a BUG or not?

    CRUD with php/mysql #76983

    Peter Stoev
    Keymaster

    Hi ritttchy,

    You do not provide any information so I cannot tell whether It is or is not. I do not know whether you use the widget correctly. I asked you several times for example. If you do not wish to provide such, then I would not be able to help you.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    CRUD with php/mysql #76987

    ritttchy
    Participant
Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic.