473,607 Members | 2,659 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php mysql horizental looper in one mysql table

1 New Member
Hi

i have a mysql table :

each uer have 4 emails


id user_Id email

1 11 emailx@email.co m
2 11 emailc@email.co m
3 11 emaild@email.co m
4 11 emailv@email.co m

5 12 emailr@email.co m
6 12 emailb@email.co m
7 12 emailW@email.co m
8 12 emailT@email.co m

9 13 emailJ@email.co m
10 13 emailI@email.co m
11 13 emailL@email.co m
12 13 emailQ@email.co m

How to sort the row result horizentaly


like that




user_Id email1 email2 email3 email4

11 emailx@email.co m emailc@email.co m emaild@email.co m emailv@email.co m
12 emailr@email.co m emailb@email.co m emailW@email.co m emailT@email.co m
13 emailJ@email.co m emailI@email.co m emailL@email.co m emailQ@email.co m
Apr 18 '18 #1
0 1375

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1953
by: steve | last post by:
I have an on-going problem that my ".MYI" mysql files get corrupted. I have written php trapping routine to report on the problem to admin. My next step is to initiate "repair table" right after the error is trapped. The problem is that then I would have multiple repair table commands initiated from different browser sessions. How can I make sure that only one "repair table" is running at a time. --
3
2000
by: kiqyou_vf | last post by:
im sort of a newbie to all of this and my terminology isnt accurate but i have a couple simple questions. ive been looking around for a way to insert multiple and seperate strings (like an array or a csv file) inside of one row "cell" in a MySQL table. for examlpe id like to insert "review1..., review2..., review3..., review4..." inside a row "cell". id also like to be able to do a loop on them so i can format each string. is it possible...
0
414
by: joe | last post by:
I am writting a webmail client using mysql as the backend. I wrote the scripts using a table for each separate user. I am thinkig about putting all users in one table. the table structure now is pk, msg, folder. i am thinking about adding a separate field called user are there any advantages or disadvanges for doing this. I think some disadvantages could be larger/file table size and need of locking tables for updates, and probably less...
4
18684
by: Gordon Burditt | last post by:
What's the easiest way to copy a row from one table to another (with the same schema), without knowing in advance the number and types of the columns? The problem: I have several sets of tables with a primary key of 'account', which contains an email address. If someone changes their email address, I need to change the 'account' field. Unfortunately, someone thought it would speed up lookups if instead of having one table 'settings',...
9
2788
by: Dejan | last post by:
Hy, Sorry for my terreble english I have this simple code for deleting rows in mysql table... Everything works fine with it. So, what do i wanna do...: my sql table looks something like this: id Name Surname pictr0 picrt1 pictr2 pictr3
10
13397
by: eholz1 | last post by:
Hello Members, I am setting up a photo website. I have decided to use PHP and MySQL. I can load jpeg files into the table (medium blob, or even longtext) and get the image(s) to display without a problem. I am using chunk_split(data) and the base64_encode and base64_decode on the files. I do a select from the database, and then echo the image (with header(Content Type: image/jpeg) and the decoded image displays fine. Yes, I have...
3
1887
by: ravikiranveluguleti | last post by:
hi, this is ravikiran i am working on a project(using java & mysql) that requires creation of a editable mysql file that contains all the data present in a particular table ,(like .mdb file that MS-Access will create for every table).Is mysql having a facility to create such file.If so how??? help me thanx in advance.
11
3757
by: kennthompson | last post by:
Trouble passing mysql table name in php. If I use an existing table name already defined everything works fine as the following script illustrates. <?php function fms_get_info() { $result = mysql_query("select * from $tableInfo") ; for ($i = 0; $i < mysql_num_rows($result); $i++) {
11
3306
by: cooldht | last post by:
Hi all, I'm still trying to learn the ins and outs of MYSQL. I have a large database of restaurants sitting on our server, and I want to be able to cross reference the cuisines and display a page that says there are 15 Italian restaurants in Los Angeles California, 12 Mexican places in L.A., for example. the cuisine fields are character. For example, the restaurant name might be Charlie's Pizzeria, and the cuisine field could have "pizza,...
23
1589
by: MikeB | last post by:
I'm learning PHP and MySQL. In the samples I work with, the SQL table names are "escaped" in accent grave (`) marks, not in single or double quotes. Can anyone explain that? For instance, I have the following: $sql_command = "SELECT * from `7-1_List`";
0
7987
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8472
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8464
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8130
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8324
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6000
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.