Questions tagged as 'auto-incremento'

1
answer

Intersection of same table, auto relationship, mysql with INNER JOIN

Hello, I'm doing a facebook clone database. I have two tables, one of users and another friendship. The friendships table is a self-relationship of users as shown in the picture. This Friendship table contains the IDs of each user and n...
asked by 24.10.2018 / 22:14
1
answer

How to increment the index of an unlimited array?

How can I increment an array within a structure? My structure is this: struct list { char name[50]; int products_list[]; } LIST[10]; I wanted to know the current number of elements in the array (list_products) to add more products with t...
asked by 01.01.2017 / 23:03
2
answers

Can I get the value of an autoincrement column before it is saved in the database?

I have three tables: preco , estabelecimento and precoXestabelecimento . The id of price is autoincrement and there is a N: N relationship between the first two tables, which is represented by the third precoX...
asked by 24.11.2016 / 14:31
1
answer

Reordering AutoIncrement in SQL

Hey guys, I created an ID table with Auto Increment, checking the table I saw that Bugou, has any command in SQL that reorders from the value 1,2,3,4 to the last one? just for the sake of reorganization. Thank you.     
asked by 12.09.2018 / 18:24
1
answer

Column id with primary key and auto increment is returning null MYSQL PHP

Good night guys, this is the following, I have an application that was working until these days, today when I was adding a post in the database, my id_post that is Primary Key and Auto_increment is not being added, it returns the error that it m...
asked by 14.09.2018 / 00:39