Ask a Question related to PHP Development, Design and Development.
-
DotKom #1
multiple records per row
Ok guys, this is a simple question I know but I'm a php noob. I can display
1 record per row just fine, exactly the way I want, however, I want to
display 3 records per row. I'm assuming I need to use some sort of counter
to do this but I'm not sure how the code should look to make this happen.
Can anyone give me some help OR online resources that deal with this
subject. Thanks in advance.
Jason
DotKom Guest
-
CF Multiple Queries, Multiple Records
All, I've got three queries all passing variables from previous queries. The issues? The second query returns 4 records. I want to use IDs for... -
update multiple records in multiple tables from one form
hello I have been trying to run multiple update queries based on the data entered by user. Brief background: I am fetching data from various... -
Deleting multiple records
Here's what I have... A table with 3 columns. Headings are (Name, Prayer Request, and Delete). A loop that goes through a Record Set and prints... -
help-how to merge multiple records into 1
these exist in a both excel and filemakerpro, in fmpro, they are single records, i want to merge single records into 1 record based on the same... -
adding multiple records
Thanks Perry, I am not sure what : (" & (nBsae £« 1£ > © & " )") is as the characters are not normal? could you please repost, thank... -
Centurion #2
Re: multiple records per row
DotKom wrote:
I'm not going to give you the answer directly, but here's a hint: fields in> Ok guys, this is a simple question I know but I'm a php noob. I can
> display 1 record per row just fine, exactly the way I want, however, I
> want to display 3 records per row. I'm assuming I need to use some sort of
> counter to do this but I'm not sure how the code should look to make this
> happen. Can anyone give me some help OR online resources that deal with
> this subject. Thanks in advance.
>
> Jason
a single row are indexed like arrays.
Say you fetch a row from a database with the following SQL statement:
SELECT foo,bar FROM baz WHERE snafu="fubar";
(?? this looks right...could be wrong too, SQL 'aint my strong point :P)
You'll get a bunch of rows back with two fields; foo and bar. Let's assume
you fetched the rows into a result set called $myrow.
Now these fields can be indexed like arrays:
$myrow[0]; // ie, foo - the 1st (or 0th) index
$myrow[1]; // ie, bar - the 2nd (0th +1) index
Geddit? Depending on how you fetched your result set you can even refer to
them like this;
$myrow[foo];
$myrow[bar];
Neat huh? Do some reading at [url]http://www.php.net/[/url] (look at the examples in
MySQL command set) and if you're still stuck, have a look at other people's
code at places like [url]http://www.hotscripts.com/[/url]
Good luck.
James
--
You will pioneer the first Martian colony.
Centurion Guest



Reply With Quote

