Ok I tired this but it did not help, but thank you.
-Original Message-
From: Herman Verkade [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 28 July 2002 1:18 a.m.
To: 'Barry Rumsey'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] select from two tables
Well, I'm just a beginne
I have the following code:
$query = "SELECT * FROM xoops_album,xoops_artist WHERE
xoops_album.artist_id = xoops_artist.artist_id";
$albumby = mysql_query($query) or die("Select Failed!");
echo"";
if (mysql_num_rows($albumr)) {
while ($album = mysql_fetch_array($albumr))
{
echo ($album
I have the following insert :
mysql_connect( "localhost", "", "" );
mysql_select_db( "" );
mysql_query("INSERT INTO music_album VALUES
(NULL, '$artist_id' ,'$album' ,NULL ,NULL)");
mysql_query("INSERT INTO music_songs VALUES
(NULL ,NULL ,NULL ,NULL ,'$songn
Yes I see what I have done wrong. I named it music_artist instead of
nameing it music_artist.id
Sorry about that but thanks for the help. I think I'll need more help as
I'm still learning.
-Original Message-
From: Christian Schneider <[EMAIL PROTECTED]>
To: Barr
into the
table 'music_album' as $artist_id.
-Original Message-
From: Gurhan Ozen <[EMAIL PROTECTED]>
To: Barry Rumsey <[EMAIL PROTECTED]>, php-db list
Date: Wed, 17 Apr 2002 19:02:52 -0400
Subject: RE: [PHP-DB] drop list inserts
> Hi Barry,
> First of all,
> $quer
I have the following to pages( just testing them at the moment ):
";
$getlist = mysql_query("SELECT * FROM music_artist ORDER BY
artist_name ASC");
echo " Artist Name : \n";
while ($row = mysql_fetch_array($getlist)) {
echo ''.$row["artist_name"]."\n";
}
echo " \n";
echo "Album Name : ";
echo
Are there any good tutorials for beginners on forms and inserts into
mulit-tables ?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am setting up a music info site and have decided on the follow tables
( not to sure weather to add the mp3 part). The one main question I have
before starting to make the tables is weather mysql_insert_id() would be
able to handle this with the way I have it ?
:Artist
id
artist_name
:Album
i
I have the following code:
$query = "SELECT * FROM artist WHERE artist LIKE 'b%' ORDER BY artist
ASC";
$result = mysql_query($query) or die("Select Failed!");
echo "Total Number Of Artists In \"B\": ";
echo mysql_num_rows($result);
echo "";
if (mysql_num_rows($result)) {
echo "";
echo "Artists";
I know how to do the option call e.g.
This is the list of artists already in our database :
But I want to do a form where they select the option then fill out rest
of form. The option above returns the artist name, but I want to insert
the artistid.
--
PHP Database Mailing List (http://ww
I am trying to do a simple fetch of the lastest add name. I have the
following code :
$query = "SELECT name FROM name ORDER BY name DESC LIMIT 1";
$latename = mysql_query($query) or die("Select Failed!");
$latename = mysql_fetch_array($latename);
echo "Lastest Name Added: $latename"
I know
Thank you everyone. The "COUNT(*) AS c" worked great.
---Original Message---
From: Kai Voigt
Date: Friday, 25
January 2002 11:11:06 a.
To: Barry Rumsey
Cc: [EMAIL PROTECTED]
Subject: Re:
Zach wrote:
"I do generally find that the more brief I am in
describing an issue, themore likely I am to get a reply. Then details
can be given if needed, infurther correspondences."
I would like to disagree with this. I am only a newbie to php an
Neil
Date: Thursday, 24
January 2002 9:25:06 a.
To: Barry Rumsey
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB]
Books and what nots
and as they say "if we haven't got it in stock, we'll get it in for
you..."
At N
I'm trying toadd thefollowing codeto atheme:
."\n"
."$sqlhostname = "localhost"; $login =
""; $password = ""; $base = "xplyrics"; $db_connect =
mysql_connect($sqlhostname,$login,$password); $base_selection =
mysql_select_db($base,$db_con
In one of my tables I have a field called count_view, How do I add
all the totals up to come up with one grand total of
views.
IncrediMail - Email has finally evolved -
Click
Here
I have the following query:
$query = "SELECT * FROM xp_topics, xp_stories WHERE xp_topics.topicid =
xp_stories.topicid AND xp_topics.artistname='Faith Hill' ORDER BY topictext DESC LIMIT
0,20";
It returns the lot but a lot of doubles.
I want to put a DISTINCT call the query, but if I put it a
I ended up rewriting it again and somewhere I must have done something wrong
as it now works. Thanks guys. Maybe I should think about more sleep.
- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>;
I can't figure out where I have gone wrong. Maybe not enough sleep, anyway this is the
simple query:
$query = "SELECT * FROM xp_topics WHERE artist='artist'ORDER BY topicid DESC LIMIT
0,1"; $result = mysql_db_query($query) or die("Select Failed!");
echo("Latest Artists : $topictext ");
It says
How do you add a count feature to a link. I can get stuff from the db but want to know
how many times it's been read or click on?
I'm trying to create a page like the following:
A B C D ...
a1b1c1d1
a2b2c2c3
You know the kind of pages I'm talking about. I need to grab the first letter of each
entry and then limit them to the last 5 entry's by date( I know how to
This is properly a simple question but I can't figure it out.
Lets say I've got there tables: table1(art_id,artist), table2(song_id,art_id,song),
table3(image_id,art_id,image).
What I'm trying to do is get 1 image displayed with the songs on that album displayed
next to it. All I can get is 1im
I'll ask this question again but in a different way.
In these php news portals like phpnuke, myphpnuke, they lay their site out in these so
called blocks.I'm looking for information on how these blocks are made, are they done
in php or html and where can I find more information on this.
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, January 12, 2002 12:51 PM
Subject: Re: [PHP-DB] multiple tables insert
> Barry,
>
> Good question, and you have discovered one of M
ent gave it the value
of 5, how would I update the 'album.art_id' with the same value?
- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday,
Two questions:
1) If I have a url in the db that points to a image , how do I get php to get this
image and display it ?
2) I have 4 tables in the db and would like to know of a good tutorial on inserting to
multiple tables form a single form
ones like phpnuke, myphpnuke, postnuke etc
- Original Message -
From: "olinux" <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>
Sent: Friday, January 11, 2002 7:26 PM
Subject: Re: [PHP-DB] PHP blocks
> What portals?
>
> olinu
On these web portals they have things call blocks that arrange the layout of the site.
Where can one go to learn how to do this sort of layout.
I'm trying to do the following query:
$db_connect = mysql_connect($sqlhostname,$login,$password);
$base_selection = mysql_select_db($base,$db_connect);
$query = "SELECT DISTINCT * FROM xp_topics WHERE artist_count='artist' AND topictext
LIKE
'A%' ORDER BY artist_count ASC limit 0,5";
I have a colum with the numbers between 0-9 ( table is a list of bands )eg. 2 live
crew , 2pac , 1 maniacs also in this table Ihave normal names like : abba , queen
, police etc..
How would I query the table to list only the ones starting with numbers.
I have two tables, the first one I query like :
$query = "SELECT * FROM xp_topics WHERE artist_count='artist' AND topictext LIKE
'B%' ORDER BY artist_count DESC limit 0,5"; $req = mysql_query($query);
$res = mysql_num_rows($req); if ($res == 0) { echo "
Sorry there
Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2
$query = "SELECT * FROM xp_sings,xp_artist,xp_songs WHERE xp_artist.artist_id =
xp_sings.artist_id AND xp_sings.song_id = xp_songs.song_id AND song_name LIKE 'b%'
DESC LIMIT 5";
$req = mysql_query($query);
$res = mysql_num_rows($req);
if ($res == 0)
{ echo "Sorry there is no result.";}
else
{
Hi
In these web portals they have these things called blocks, is there a tutorial on how
to do these anywhere
One last question for tonight as I have been given alot of help from this group to
keep me going for awhile.
I would like to set up one of those " A B C D E F " page listings. How do i query the
database to grab the first letter from each entrey.
Yes thank you that was the answer.
While I'm asking questions , I've got one good one :
Whats the best book to buy on php & mysql ?
- Original Message -
From: "Andrey Hristov" <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>
Cc:
Hi
I have a database that has lyrics in it. I can get them to list but they are not
aligned the same as whats in the database. How can I get the results aligned as whats
in the database ?
t; <[EMAIL PROTECTED]>
To: "Barry Rumsey" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, January 07, 2002 1:51 PM
Subject: Re: [PHP-DB] help on mulit query
> You seem to be doing it fine as far as I can see, except for "song_id"
which should be &qu
Hi
I have three tables set out below:
xp_artist: artist_id , artist _name
xp_sings: artist_id , songs_id
xp_songs: songs_id , song_name , lyrics
I can not figure out how to query and return the results for a query like:
"select song_name FROM xp_artist,xp_sings,xp_songs WHERE xp_artist.artist_
39 matches
Mail list logo