Loop column after 2 results


Posted on 16th Feb 2014 07:03 pm by admin

Hello All.

Here is what I have:

Did you know?Explore Trending and Topic pages for more stories like this.
Client ID Company name Client ID Company name

I then need a script to echo 2 results per row then start a new row.

I've tried many things, but never could get a second row to appear. Each row will have 4 columns.

Here is my code without the "guts" My vars will be $id and $company.

$result = mysql_query("SELECT * FROM client");
if(mysql_num_rows($result) < 1)
{
$results = 'You have 0 clients.';
}
else
{
$results = '';
$results .= '<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">';
$results .= '<tr>';

while($row = mysql_fetch_array($result))
{

}
$results .= '</table>';
}
No comments posted yet

Your Answer:

Login to answer
232 Like 12 Dislike
Previous forums Next forums
Other forums

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

how to get IP address?
hey guys,

i have this code which is supposed to get me the IP address of my site visitors:

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

pass form variables straight to email, no database required?
hello all,

im working on this form...

http://www.adobedayevents.com/project_request/pr

How to write on database when a link is clicked?
Hi, I have a list of products in a gridview. When the link is clicked currently it takes to an ext

Redistributing dependent dlls
Hai all ,

I have created an application in VC++ using VS2008 in a development machine which r

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

This is driving me nuts!
This insert query looks to be alright, however I get this error:

QuoteYou have an error in yo

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash