# Recognize Primary Key INT field as VarChar

**URL:** <https://forum.radsystems.io/t/recognize-primary-key-int-field-as-varchar/660>\
**Category:** PHPRad Vue\
**Created:** [December 16, 2021, 2:29am UTC](https://forum.radsystems.io/t/recognize-primary-key-int-field-as-varchar/660 "2021-12-16T02:29:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbscan](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@sbscan](https://forum.radsystems.io/u/sbscan)\
**Post date:** [December 16, 2021, 2:29am UTC](https://forum.radsystems.io/t/recognize-primary-key-int-field-as-varchar/660/1 "2021-12-16T02:29:06Z")

</div>

I tried in PHP Pyton and nodejs. Also tried on both mariadb and mysql. Open new databases but result is same. It recognize my primary key as VARCHAR, so I have errors on edit and new operations. I sync again and agian, no success…

 ![image](https://forum.radsystems.io/uploads/default/original/1X/b17635e7e27bffd29cc1642b27126b83c04f00d9.png)

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [December 16, 2021, 9:03pm UTC](https://forum.radsystems.io/t/recognize-primary-key-int-field-as-varchar/660/2 "2021-12-16T21:03:02Z")

</div>

You need to edit your database and change your primary key field to **auto increment primary** key. When you create tables using Radsystems Studio, it automatically set the first field for you as id **primary key, auto increment**. If you don’t understand database design, do not edit that field go to the next empty line and name the rest of your fields needed for that table.
