Skip to main content
Topic: Request New Branch in Forum to share TIPS and Advises (Read 1420 times) previous topic - next topic

Request New Branch in Forum to share TIPS and Advises

I think PHP Rad developers should put a topic called Tips and Quick Codes, although the speed of response is not what we desire, I think the way to grow in the community is by sharing useful codes and tips, here I share mine.

1St Tip

If u need autoincrement on a Adding page u will use this

"SELECT  `id`+1  FROM `table` ORDER BY `id` DESC LIMIT 1"

When u choose a new one the ID add in one , may be other field to check a count


2nd Tip
When u need join Last Name and Name on a List u can use this

"SELECT  CONCAT(lastname'  ',name) AS value  FROM employees"


Below is attached an image where u need load this

Goods codes!!



Re: Request New Branch in Forum to share TIPS and Advises

Reply #1
Hi, where should I add the sql to concatenate surnames and first names? should i create a new field?

Re: Request New Branch in Forum to share TIPS and Advises

Reply #2
Hi, u need a new Field with enough space to allow inpĆ¹t Lastname and Name, in the options of the field u need select ( (*) Select Option) and put the SQL String into it.