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

Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.

Making multiple rows with one query
I have a table called efed_handler_characters with two fields handler_id and bio_id. What query 2 is

When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

whats wrong with my code please help!!!
this is the error


Warning: mysql_close(): supplied argument is not a valid MySQL-Link res

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

Session problem?!?
Hello All! I am very new to the php world but I am working on fixing things that a previous programm

connect() succeeds but accept() does not?
Please help me with this problem. I'm working on a time-sensitive project where I'm using TCP socket

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

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