[PHP-DB] Bug in SQL can you help?

2002-07-09 Thread JJ Harrison
oblem is that is counts the number of rows in the whole thing not the echoed row. How can I get it count the best days only? -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Getting Percentage of coloumn value

2002-07-09 Thread JJ Harrison
later do stuff with it in PHP): +---++ | name | percent | +---++ | foobar | 75| | barfoo | 25| +---++ Thanks in advance, -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe

[PHP-DB] Executing PHP script through image

2002-07-09 Thread JJ Harrison
g the entire script into a file and then using within the page. The problem is that I don't know how to output the image with PHP. The image would not be dynamic just a file on the server. I would appreciate peoples comments or other suggestions JJ Harrison [EMAIL PROTECTED] www.tececo.com

[PHP-DB] Re: Executing PHP script through image

2002-07-09 Thread JJ Harrison
Sorry wrong PHP list :} "Jj Harrison" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am making a stats program. > > When the nessicary include file is included it does a reverse-DNS lookup to > find the remote host'

[PHP-DB] Re: Getting Percentage of coloumn value

2002-07-09 Thread JJ Harrison
w can I echo count(referer) ? I currently get this error Warning: Undefined index: count(referer) in C:\Inetpub\TecEco_PHP\stats_interface\referer_base.php on line 16 -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Jj Harrison" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTE

[PHP-DB] Good table structure for search

2002-07-22 Thread JJ Harrison
ent' then I could use a join to get the title, time etc of the article and return the results. What I am asking is that if this is a good table structure for something like this(N00B alert!). If not could you please give me a better one? -- JJ Harrison [EMAIL PROTECTED] www.tececo.com

[PHP-DB] problem with where clause

2002-07-24 Thread JJ Harrison
score > 0 and article_data.aid = article_keyword.aid group by article_data.aid order by score desc when I do the query in PHP I get a message saying: Unknown column 'score' in 'where clause'. How can I fix this? -- JJ Harrison [EMAIL PROTECTED] www.tececo.com --

[PHP-DB] database entry is in the supplied text?

2002-07-24 Thread JJ Harrison
Thanks for the replies so far. I see which method is best in 5-10 min. My question is that if SQL/mySQL support some sort of function to see if a database entry is in the supplied text? -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Jj Harrison" <[EMAIL PROTECTED]> wrote i

[PHP-DB] Counting Words in TEXT field

2002-07-25 Thread JJ Harrison
I am using mysql. Is it possible to count the number of words in a text column? Or is this a job for php(The info will be going into php anyway)? I can use $word = explode(' ',$row['text']); then use count($word ). I just ask because mysql *may* be able to do it. -

[PHP-DB] Error is SQL(works in phpMyAdmin)

2002-07-26 Thread JJ Harrison
#x27;, 8.94855); INSERT INTO article_keyword VALUES (3, 'our', 4.47427); INSERT INTO article_keyword VALUES (3, '(the', 4.47427); INSERT INTO article_keyword VALUES (3, 'troposphere)', 4.47427); INSERT INTO article_keyword VALUES (3, 'climate', 4.47427); INSE

[PHP-DB] Re: Error is SQL(works in phpMyAdmin)

2002-07-27 Thread JJ Harrison
Here is one line of my new query: INSERT INTO article_keyword (aid,keyword,weight) VALUES (3, 'gases', 13.42282); I get the same error: You have an error in your SQL syntax near '; INSERT INTO article_keyword (aid,keyword,weight) VALUES (3, 'gases', 13.42282)' at

Re: [PHP-DB] Error is SQL(works in phpMyAdmin)

2002-07-27 Thread JJ Harrison
It turns out phpMyAdmin actually splits up the queries and does them singaly. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Cornelia Boenigk" <[EMAIL PROTECTED]> wrote in message 00ef01c23580$2ed210c0$7f54fea9@zwerg98">news:00ef01c23580$2ed210c0$7f54fea9@zwerg98..

Re: [PHP-DB] Error is SQL(works in phpMyAdmin)

2002-07-27 Thread JJ Harrison\\
In the mysql command line ; is used to signify the ending of the current query "Jj Harrison" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > It turns out phpMyAdmin actually splits up the queries and does them > singaly. &

[PHP-DB] n00b deleting entries from db.

2002-07-28 Thread JJ Harrison
I know how to delete stuff from a db. Now I want to delete all the earliest entires from the database except the latest 75 entries. Is it easy or hard? I know about limit but it doesn't seem to work the other way. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP Database Ma

Re: [PHP-DB] select from two tables

2002-07-29 Thread JJ Harrison
.. this would fixed the problem with coloumns with the same name also -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Herman Verkade" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Well, I'm just a beginner myself, but

[PHP-DB] Re: n00b deleting entries from db.

2002-07-29 Thread JJ Harrison
thx. "Dan Koken" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Jj Harrison wrote: > > > I know how to delete stuff from a db. > > > > Now I want to delete all the earliest entires from the database

[PHP-DB] Percentage...

2002-07-29 Thread JJ Harrison
How, using the group by and where statments can I return the percentage of something? ie: pid| oid| uid | 1 |2 |1 1 |2 |1 1 |2 |1 1 |1 |1 would return oid | percent 2| 75 1| 25 Thx, -- JJ Harrison [EMAIL PROTECTED

[PHP-DB] Re: Percentage...

2002-07-29 Thread JJ Harrison
Plz ignore this. found it after more searching... -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Jj Harrison" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > How, using the group by and where statments can I return the percen

Re: [PHP-DB] Re: Percentage...

2002-07-30 Thread JJ Harrison
select count(poll_vote.vid) as total, (count(poll_vote.vid) / '.$row['total_qs'].' * 100) as percentage, poll_option.poption from poll_vote, poll_option where poll_vote.oid = poll_option.oid and poll_vote.pid = '.$pid.' group by poll_vote.oid'; -- JJ Harrison [EM

[PHP-DB] Re: please help.. serial number generator

2002-07-30 Thread JJ Harrison
() is often used to store passwords and make them non-viewable. if you are just looking for a unique number an auto-increment coloumn in mysql or what ever should do it. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Rainydays Sunshine" <[EMAIL PROTECTED]> wrote in message [EMAIL

[PHP-DB] Re: Addslashes in SQL Statement

2002-08-02 Thread JJ Harrison
mySQL will tell you where your error is. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Rich Hutchins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have been wrestling with this off and on for the past couple days and > would r

[PHP-DB] Re: Addslashes in SQL Statement

2002-08-02 Thread JJ Harrison
I may be wrong about the addslashes thing. Just trying to help :) I would echo all of the post data. It appears as if very little was sent. Check your form field names etc... -- JJ Harrison [EMAIL PROTECTED] www.tececo.com "Jj Harrison" <[EMAIL PROTECTED]> wrote in message

[PHP-DB] Re: Mail problem

2002-08-11 Thread JJ Harrison\\
way to append more to an existing variable. Very useful in your case. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com > "Unknown Sender" <[EMAIL PROTECTED]> wrote in message > 002701c23924$da9b1e40$539f4dd5@administrator">news:002701c23924$da9b1e40$539f4dd5@administrat

[PHP-DB] something is wrong with this query

2002-08-17 Thread JJ Harrison
ame (which it shouldnt be). -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- Please reply on the list/newsgroup unless the reply it OT. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] something is wrong with this query

2002-08-17 Thread JJ Harrison
Thanks I originally wasn't doing a cross-table join with that query so I forgot to put the join in :-} -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- Please reply on the list/newsgroup unless the reply it OT. "Michael Hazelden" <[EMAIL PROTECTED]

[PHP-DB] Comments and table join

2002-08-17 Thread JJ Harrison
ble has article data. The other has article comments (which include a rating). With this query it only returns articles with comments. How can I get it to return all of them? (and return 0 as avg if there are no comments) I am really stuck here. -- JJ Harrison [EMAIL PROTECTED] www.tececo.