Search the Community
Showing results for tags 'id'.
SELECT user_id FROM users WHERE active = :active ORDER BY RAND() LIMIT 1 The above query works. But what if the users table is filled with thousands of users? Will this query break or be very slow? If so, what's the alternative solution to this?
Hi, I have a problem. I am doing one little job with php and html. In html i have textbox in which person id must be entered (11 numbers) I need to do with php that when all 11 numbers are entered, date of birth and gender need to be shown, For example: if id is : 39310121111 first number stands for mele/female (if 3 mele if 4 female) all next numbers are date of birth 1993 10 12 (last 4 numbers doesnt have meaning) Basicly question is. how to make syntax that entered id will be shown as gender and date of birth ? can't think of any ideas. new at php.
Say I have 2 tables. Table 1: Type(type_id, type_name) Table 2: Records(record_id, record_name, record_type) Under the "record_type" column, is it better to use type_id(eg. 10) or type_name(eg. Clothing & Watches)? If the answer is use the name, is it better to use the original name(Clothing & Watches) or a slug name(clothing-watches)?
Say I have the following. record_id | record_name ----------------------------------- 1 one 2 two 3 three 3 three 3 three 4 four 5 five 5 five I want to search through through the table and find all the records. If there are multiple records with same id, I want to combine them into 1 variable and use that. So in the above example, I have 3 threes and 2 fives. I want to combine them so that I only get 1 three and 1 five. How can that be done?