Skip to content

Not returning 1 if record string is starting with letter #240

Open

Description

@cholopa

Hello:

I have, what I think is a very strange issue, if I run this statement from Arduino:

query[] ="SELECT RFIDTAG FROM table1 WHERE RFIDTAG='2M22321321AA'";

It works(returns 1), and if a change the first characther of the search text to any number(and also change it in the database) it works fine. But if I change the first character to a letter (and also change it in the database) it returns zero.

If I execute the statement from phpadmin, it works fine, no matter if first character is a letter or a number..., so I understand the issue must be coming from the MySQL connector.

Can anyone help me please?

Activity

  1. ChuckBell commented on Oct 13, 2024

    @ChuckBell
    Owner
  2. cholopa commented on Oct 14, 2024

    @cholopa
    Author

    Hi

    Thanks for the quick replay, here you can see the defintion:

    image

    I have tried changing the column type (text, medium text..etc), all with the same result. Let me also insist in the fact, that executing the query from phpMyAdmin works fine.

  3. ChuckBell commented on Oct 15, 2024

    @ChuckBell
    Owner
  4. cholopa commented on Oct 15, 2024

    @cholopa
    Author

    I don't understand what you mean by changing the lenguage of the table.

    I'm working with Mariadb. I was using MySQL_MariaDB_Generic connector and this issue arrise. I tryed to contact support for that connector, but they is no more support... So I have change to MYSQL connector, but still same issue....

  5. ChuckBell commented on Oct 15, 2024

    @ChuckBell
    Owner
  6. cholopa commented on Oct 16, 2024

    @cholopa
    Author

    Ok, thanks for your support, In the meantime I think I can "bypass" the issue, artificially adding always a number (as you may have notice, I'm getting the value from a "serial number" of an RFID TAG).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions