PHP içinde Postgres boolean türü olması

1 Cevap php

Ben following statement hala gerçek gibi görünüyor ki inanamıyorum

So, I switched to integers and 0 or 1 works fine, but it is
stupid, that the database system has boolean variables of a smaller
size, but I should use integers for boolean values!

How do you use boolean datatype with Postgres / PHP?

Diğer bir deyişle,

Is the only way to use 1 for true and 0 for false in getting the kind of the boolean datatype?

1 Cevap

1 ve 0 kullanılarak boolean değerleri temsil etmek için çok mantıklı ve taşınabilir bir yoldur. Ve int ve yerli bir boolean türü gerçekten uygulamanın performansı, ya da veritabanı KB boyutunda çok az veya hiç fark yapacak boyutları arasında herhangi bir fark.