Generate sequence PHP number

Asked

Viewed 58 times

0

I have a database (Mysql) with about 100 registered clients and I am creating a table (ranking) of purchases of these clients, I know that the bank creates an ID autoincrement, would like to put in this table only the first 20 customers who buy more products and then would have the number of placement in the ranking and the name, but I’m not getting it.

  • I see no reason to close this question. Although the title is somewhat generic, I think the problem has never been addressed here.

  • I think so too, but guys I managed to do, I did the following: $query_clients = mysql_query ( "select * from clients " ); while ( $client = mysql_fetch_array ( $query_clients ) { $id_client = $client['id']; $name_client = $client['name']; if ($query_clients){ $sequencia++; E worked but thanks so much for your help...

  • @Rodrigorigotti Open the duplicate and you will understand. He posted exactly the same question twice.

  • @bfavaretto is true, had not seen the duplicate.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.