Frug / AJAX-Chat

A fully customizable web chat implemented in JavaScript, PHP and MySQL which integrates nicely with common forum systems like phpBB, MyBB, FluxBB, SMF and vBulletin. A Flash and Ruby based socket connection can be used to boost performance.
http://frug.github.io/AJAX-Chat/
548 stars 300 forks source link

sql user id data type contraint #226

Closed Alex-Nabu closed 8 years ago

Alex-Nabu commented 8 years ago

A problem occurred while trying to integrate with my system. The system assumes int data type for the user id and so having a user id larger than int causes problems

Frug commented 8 years ago

Hm. I'm looking at this and it strikes me that it should be an unsigned int for sure. Nobody's using negative numbers for users, and that's a valid fix which would up the maximum up to 4294967295.

But as the solution to your issue is to move everyone onto bigint or varchar, I don't think that's a great alternative. Having user_id's that high is really uncommon. Probably for your use you should alter your chat install.sql and keep your database structure handy for yourself. It is a pretty minor change.

Frug commented 8 years ago

As of 0.8.9 and commit 3e670958120317a6a778304d807e238b26bdb4ca these fields install as unsigned ints.