Hi all,
I'm using the following two queries:
1. SELECT SUM(IF(boardid='2',1,0)) AS b2, SUM(IF(boardid='1',1,0)) AS b1,
COUNT(*) AS total FROM thread
2. SELECT SUM(IF(boardid='2',1,0)) AS b2, SUM(IF(boardid='1',1,0)) AS b1,
COUNT(*) AS total FROM message
This literally brings back a total
Hugh Bothwell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Instead, you want a query which returns a record
with thread count and message count for each
group.
SELECT
COUNT(DISTINCT threadid) AS threads,
COUNT(*) AS messages
FROM
thread LEFT
Hello Cameron,
Tuesday, December 2, 2003, 1:08:19 AM, you wrote:
CS $sql = SELECT * from dates where store=$store and date=$date;
CS ultimately I would like to display data for 3 days on either side of
CS this.
The following is un-tested, but a quick look over the MySQL manual
should firm
Hello gfmb,
Tuesday, December 2, 2003, 11:18:40 AM, you wrote:
gli I have a problem.How can I redirect from a PHP script to
gli another script in asp, php or a HTML page?
gli This script redirect to another script in function of the values of a variable.
This isn't really a database related
Hello Richard,
Tuesday, December 2, 2003, 6:51:40 PM, you wrote:
HR Sorry to bother all of you with this, but are any of you still getting
HR either of these responses each time you post to this list?
Yes (he says waiting for another to arrive).
--
Best regards,
Richard
Hi php-db,
I have a table with approx. 250,000 rows in it. The primary key is an
ID field. All I am wondering is - is there any way at all from MySQL
to directly select every 50th row in this table?
I.e. row 1, 50, 100, 150, etc and return the ID of each row, ideally
with some kind of limit.
Hello Omelin,
Wednesday, December 3, 2003, 6:05:52 PM, you wrote:
OM @mysql_connect ('ipaddres-server2', 'DBName', 'DBPwd') ;
OM Is their anything else I need to consider to connect ? ,
The server must allow it :) other than that, not really.
--
Best regards,
Richard
Hello John,
Thursday, December 4, 2003, 11:01:20 AM, you wrote:
DJ The question is how do people out there
DJ back up their database residing on a server to a local file? Ideally I would
DJ download the database and save on a CD, and be able to restore from this if
DJ the worst happened.
Hello Maris,
Thursday, December 4, 2003, 10:40:33 AM, you wrote:
MK Could you share with your experience and point out where
MK is the problem here. I tried different variations for
MK domain parameter in setcookie command but it didnt help
It's a security mechanism built into cookies. They
Hello Maris,
Thursday, December 4, 2003, 12:24:10 PM, you wrote:
MK img nocache border=0 width=2 height=1
MK src=http://www.cookiedomain.com/cookies/cookies.php
MK isnt it refering and setting cookie for www.cookiedomain.com
MK even if this HTML file is on another domain?
No, because by that
Hello Andy,
Thursday, December 4, 2003, 3:27:11 PM, you wrote:
AL Im afraid ive already tried that.
Are you sure your MySQL server is actually configured to ALLOW someone
to login remotely? I know most of the ones I work with aren't. This
isn't a setting you'll find in phpMyAdmin btw. Most
Hello Cal,
Friday, December 19, 2003, 10:28:19 PM, you wrote:
CE What is the Planetside database?
It's a pay-to-play on-line multi-player FPS game run by Sony. I don't
think you could interface with it directly, at least I'd be pretty
surprised if you can.
--
Best regards,
Richard
Hello Robin,
Sunday, December 21, 2003, 10:15:35 PM, you wrote:
RK The code I am using is thus and is retrieving around 2,500 records:
RK $result = mysql_query($sql)
RK while ($row = mysql_fetch_array($result))
RK {
RK build OPTION stmt
RK }
You're building a
Hello John,
Tuesday, January 6, 2004, 5:20:22 PM, you wrote:
J On further reading, it appears LIMIT stops the query running once x number
J of records are retrieved without sorting the whole table first.
Where did you read this?
If you profile your query you'll notice that in say a 10,000
Hello jonah,
Monday, January 12, 2004, 9:48:35 AM, you wrote:
jm data and process information from the data. The issue is how to
jm access the data through the worldwide web. I want to know whether
jm PHP can be used to interface with VB and the data accessed using a
jm browser.
Depends
Hello Ignatius,
Thursday, January 15, 2004, 6:41:44 PM, you wrote:
IR Gettext is NOT an automated translation service. What you do is mark strings
IR to translate in the original application, then have them translated by a
IR human. When confronted with a marked string to echo, the application
Hello,
Thursday, January 15, 2004, 7:09:25 PM, you wrote:
r I have a very crude script set up that I am using to keep track of IP
r addresses, MAC addresses, etc and it dumps into mysql. I am using a
r column called id which is my primary key and auto-increments. My
r question is that I want
different syntax.
What I'm trying to say is that abstracting the connection to the
database is the easy part, writing an application that will support
them all is another matter.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http
the environment
it lessens the value somewhat.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in my
TL #variables.php as
TL $v_dec[page_no] = $page_no.
You don't check $v_dec in your manage.php script though, you check to
see if $page_no is set which it never will be, because no-where do you
give it a value.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
that does something like: SELECT * FROM thread
WHERE threadid IN (...) (where ... = all of the IDs previously
selected). Would the fact that threadid is my primary key make the
original LIMIT/sort faster?
Any thoughts appreciated.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296
to solve it? I _have_ to store some variables anywhere.
Yes agreed - but you cannot store them in a variable because they will
be lost each time the page reloads. Why not store them in a cookie?
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing
to look into it.
Thanks.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of the thread (associated messages are held elsewhere)
but in making a smaller table I'd just have to join the data back in
again, surely?
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
) - it holds an MD5 key, for some reason MySQL-Front
exported the description as a varchar, sorry for the confusion!
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
? If it does
then maybe I would see some more performance increases.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in it).
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
SELECT * FROM users WHERE access=2
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello peppe,
Thursday, March 4, 2004, 12:02:40 PM, you wrote:
p The problem is in access values are like string 1,2,3,4,5
Sorry, I didn't realise that. In this case FIND_IN_SET (which I think
Ignatius suggested too).
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
of the tables will contain all of the
thread_ref's in question.
Does anyone have any ideas or is it just not possible using this
method? I'm not using MySQL 4 otherwise I would have looked at using a
UNION.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database
(in this
instance $_POST) if you want:
?
function addslash ($item1, $key)
{
$item1 = addslashes($item1);
}
array_walk($_POST, 'addslash');
?
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit
. what is the difference in
possible maximum values held between an INT(10) and an INT(4)? I know
MySQL will create an INT(10) as standard but I'm not sure I need it to
be able to hold a number that high.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database
can see the relationship between them and see
what fields you have, etc.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
34 matches
Mail list logo