Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Results

Status
Not open for further replies.

Rhyan

Programmer
Jul 4, 2000
33
US
Using PHP/MYSQL, I am trying to display a table with 2 columns.

Names that begin with aaa_ and that begin with bbb_, which are all together in a table field named Names so it'd look like this:

__________________________
aaa_kdjkjf | bbb_ijkjeje |
aaa_terem | bbb_imeeee |
aaa_chack | bbb_bamju |
---------------------------

Anyone have a clue, I figured you had to do a sort, but wasnt sure how to do multiple sorting and displaying.

Thanks
 
Hi Rhyan,
You could use two queries, 1 with aa's and the other
with bb's.

Then use two HTML tables within one HTML table
ie.

<table border=0>
<tr>
<td><!-- col 1-->
<table ... print results ..

</td>
<td><!-- col 2-->
<table ... print results ...
</td>
</tr>
</table>

that should give you two columns , one with a's the
other with b's.

Cheers
 
I sort of figured that would be the way to go but the query has me stumped, not sure hwo to write it to draw records beginning with A in one table and Beginning with B in the other

Select * FROM tablename Where ??

I had thought there was a way to draw records that begin with letters, not sure though
 
I think I remembered how to do it finally!!!

SELECT * FROM pet WHERE name LIKE &quot;b%&quot;;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top