• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DB formatting question

I have peoples names in 2 fields (F_Name and L_Name).

How can I select this data and display it under one heading?

SELECT Players.F_Name (what goes here) Players.L_Name Player
FROM Players
 
i believe you're looking for the double-pipe (or is it single-pipe?) "|"

it might be db specific, so tell us what your db is if that doesn't work
 
Originally posted by: mugs
What are you developing this database in? Access? MySQL?

MySQL

I have a field called F_Name and a field called L_Name in the table "Players"

I know I can use:

SELECT Players.F_Name, Players.L_Name
FROM Players

and the results are displayed under their own field name. But, if I do this:

SELECT Players.F_Name & Players.L_Name Player
FROM Players

It displays the heading properly, but all the results become set to zero as opposed to a concatenation of the 2 strings.
 
You doing this in PHP? Why not just combine them in your PHP code rather than the MySQL query?

Use this to do it in MySQL:
SELECT CONCAT(Players.F_Name, " ", Players.L_Name Player
FROM Players
 
Originally posted by: mugs
You doing this in PHP? Why not just combine them in your PHP code rather than the MySQL query?

Use this to do it in MySQL:
SELECT CONCAT(Players.F_Name, " ", Players.L_Name Player
FROM Players


This works...
 
Back
Top