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!);
echotdcenter;
if (mysql_num_rows($albumr)) {
while ($album = mysql_fetch_array($albumr))
{
echo
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 beginner myself, but I
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 ,'$songname'
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: Barry Rumsey [EMAIL PROTECTED
I have the following to pages( just testing them at the moment ):
? mysql_connect(host,,);
mysql_select_db(music);
echo form name='add_album' method='post' action='test-album-add.php';
$getlist = mysql_query(SELECT * FROM music_artist ORDER BY
artist_name ASC);
echo Artist Name
'music_album' as $artist_id.
-Original Message-
From: Gurhan Ozen [EMAIL PROTECTED]
To: Barry Rumsey [EMAIL PROTECTED], php-db list php-
[EMAIL PROTECTED]
Date: Wed, 17 Apr 2002 19:02:52 -0400
Subject: RE: [PHP-DB] drop list inserts
Hi Barry,
First of all,
$query_id = mysql_query(INSERT
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 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 bLastest Name Added:/b $latename
I know I
I know how to do the option call e.g.
This is the list of artists already in our database :
SELECT name=artist
?php echo $option_block; ?
/SELECT
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
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:
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 Newmarket one of
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 and
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
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 br);
It says
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]; [EMAIL PROTECTED]
Sent: Friday, January 18
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'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.
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?
olinux
--- Barry Rumsey [EMAIL PROTECTED] wrote
PROTECTED]
To: Barry Rumsey [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, January 12, 2002 9:50 AM
Subject: Re: [PHP-DB] multiple tables insert
Barry
See below ...
At 09:09 AM 1/12/2002 +1300, Barry Rumsey wrote:
Two questions:
1) If I have a url in the db that points to a image , how
: 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 MySQL's limitations, it does
not enforce functional constraints
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'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;
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 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 /p
pbSorry
Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2
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 ?
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: [EMAIL PROTECTED]
Sent: Tuesday, January 08, 2002 1:27 AM
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.
Hi
In these web portals they have these things called blocks, is there a tutorial on how
to do these anywhere
$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 centerbSorry there is no
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
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 songs_id in the query...
Bogdan
Barry Rumsey wrote:
Hi
I have
34 matches
Mail list logo