Okay
  Public Ticket #3686124
Leading zero stripped from phone number
Closed

Comments

  • Chris Lambert-Shiels started the conversation

    Hiya - I am using SQL to query a contact list in the datrabase. One of the columns is a VARCHAR containing a phone number, which starts with zero. When the query displays wpDatatables treats it as numeric, drops the leading zero & right justifies. How can I override this? Thanks, Chris   


  •  1,805
    Miloš replied

    Hi Chris,

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.


    This should not happen with String data type.

    We do have a limitation, but that is partly a limitation from the SQL logic itself, if we import some data from an Excel/CSV or google Sheet which has 'leading zeroes' and if we don't make sure to set up a Column like that as "String type" during our Manual table import - our Plugin sometimes 'guesses' it should be a numeric field ( integer or float) then escapes the zeroes in the database.


    But if your database properly shows this data in the Database and is marked as Text/Varchar, then this is strange.

    Can you please send me an SQL Dump of this Table from your Database and we can import it here to do some testing and try to isolate the issue?

    You can upload it to weTransfer for example and send a download link.


    2. Or, actually, maybe I have a better idea.

    Can you try to go in this Column Data settings, then just change the column type in our Plugin from numeric to String and this might resolve the issue right away?

    6259487247.png

    Let me know if that helped.

    If not, you can still send us an SQL dump from your Table then we can reproduce the issue here and isolate it.

    If it contains any sensitive data, just mark the reply as PRIVATE, for security reasons.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables