Listing more than one item of a table

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 80
Joined: Fri Jan 31, 2003 4:18 pm

Sat Feb 15, 2003 1:12 pm

"SELECT id,song_artiste,song_title FROM $table WHERE song_artiste LIKE '%$q%' OR song_title LIKE '%$q%' OR song_album LIKE '%$q%' OR song_lyrics LIKE '%$q%' ORDER BY song_artiste"

please read something about writing queries at if you want to know more about this :)

New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Sat Feb 15, 2003 1:42 pm

printf("<LI><A HREF=\"display.php?id=%s\">%s</A>", $myrow[0], $myrow[1]);

printf is a formatted echo according to the terms - so %s = in both cases $myrow[0]

I prefer just using echo so would use

echo '<LI><A HREF="display.php?id=' .$myrow[0]. '">' .$myrow[0]. '</A> - ' .$myrow[1];
avatar image based upon nasas apod (only updates if I post though)

Post Reply