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

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

is this the proper use of mysql_real_escape_string() to prevent sql injections?
i was wondering is this the proper use of mysql_real_escape_string() to prevent sql injections? any

Connect to database that isn't localhost
I am currently doing a small script for a company that doesn't have mySql support on there hosting.

temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

matching numbers inside ( )
I know I can match numbers by just [0-9]+, so I thought matching numbers inside ( ) would be somethi

blank page.... nothing is happening.
I'm new to a lot of this but in the last 24hrs have learned a lot.
Installed latest version of my

Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.

we have to suppl

Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

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