Hi All,
I use
SELECT COUNT(*) FROM whatever WHERE whatever
to determine how many rows a particular query will return (then use this count
to assist with pagination).
The problem is that this does not work if the query contains a GROUP BY
statement as, of course,
the query will return many
Hi
I have two MySQL databases, on for aeromodelistas (aeromodelling) and
another for Códigos Postais (Postal Codes). I whant to do the
following query
SELECT CódigoPostal FROM Aeromodelistas
WHERE CódigoPostal IN
(SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO
WHERE
This is what I use when needing to do this:
1. Put all the values you want to search for in an array $vals (loop
around the first result)
2. $query =
select count(Nome) from Aeromodelistas
where year(AnoQuota)=2005
and Sexo='Masculino' and Distrito IN .sqlIn($vals)
;
function
If you don't want a group count, but want a total row count instead, there's
no reason to have the group by statement, If you're trying to have a
conglomerate result, where one column is always equal to the total count,
wouldn't it be more efficient to have a seperate query for that?
-Micah
El Dom 26 Jun 2005 07:39, Ross Honniball escribió:
Hi All,
I use
SELECT COUNT(*) FROM whatever WHERE whatever
to determine how many rows a particular query will return (then use this
count to assist with pagination).
The problem is that this does not work if the query contains a
[[[ O-F-F topic ]]]
prefer replies offlist if they have to be done, but I had to clear the
waters some on this.
that said...
JeRRy wrote:
[A lot of mostly unintelligible and worthless to quote jumble]
delays like this are not frequent, and should not be.
delays like such. Most recently
Ok here's a dummy question from yet another newbie:
Reading the instructions for enabling the MySQL Functions, I understood
until i get to this:
For compiling, simply use the --with-mysql[=DIR] configuration option where
the optional [DIR] points to the MySQL installation directory.
i have a
Hello All,
I’m trying to get php to connect to my PostgreSQL database.
The code that I’m using is below.
htmlheadtitleLogin/title
/head
body
?php
$conn = dbname=auth user=auth;
$db = pg_connect ( $conn );
?
/body
/html
Warning: pg_connect(): Unable to
Hello All,
I’m trying to get php to connect to my PostgreSQL database.
The code that I’m using is below.
htmlheadtitleLogin/title
/head
body
?php
$conn = dbname=auth user=auth;
$db = pg_connect ( $conn );
?
/body
/html
Warning: pg_connect(): Unable to
Hello All,
I’m trying to get php to connect to my PostgreSQL database.
The code that I’m using is below.
htmlheadtitleLogin/title
/head
body
?php
$conn = dbname=auth user=auth;
$db = pg_connect ( $conn );
?
/body
/html
Warning: pg_connect(): Unable to connect
Hello All,
I’m trying to get php to connect to my PostgreSQL database.
The code that I’m using is below.
htmlheadtitleLogin/title
/head
body
?php
$conn = dbname=auth user=auth;
$db = pg_connect ( $conn );
?
/body
/html
Warning: pg_connect(): Unable to
It worked!
SELECT COUNT(*) FROM (SELECT COUNT(*) FROM ad.off_enrol GROUP BY
jcu_campus, sub_code) t1
Thank you list -:)
Martín Marqués wrote:
El Dom 26 Jun 2005 07:39, Ross Honniball escribió:
Hi All,
I use
SELECT COUNT(*) FROM whatever WHERE whatever
to determine how many rows a
I modafide the code some more and now with the following code I get this
error.
CODE:
htmlheadtitleLogin/title
/head
body
?php
pg_connect(name=auth); (user=auth);
?
/body
/html
Parse error: parse error, unexpected '=' in
The error is in your function pg_connect
pg_connect(name=auth user=auth);
I'm not a PostgreSQL user but your connection string should be enclosed into
by quotes. Documentation can be found at
http://us3.php.net/manual/en/function.pg-connect.php
Hope this helps,
Robbert
-Original
Thanks for the help.
The code now looks like this.
CODE:
htmlheadtitleLogin/title
/head
body
?php
$conn = pg_connect(user=auth dbname=auth password=redhat)
or die (Could not connect) ;
echo Connectd Successfully;
pg_close($conn);
You might need to include the hostname and port.
-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 26, 2005 6:48 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Re: PostgreSQL error with PHP
Thanks for the help.
The code now looks like this.
CODE:
I add the hostname and port, then I configure postgresql.conf and enable
the port 5432 line in the config file.
So this is the new code.
htmlheadtitleLogin/title
/head
body
?php
$conn = pg_connect(
user=auth dbname=auth password=redhat
I rewrote the code. This is the code and errors.
This is starting to get old, I have been working on this for over a week
now.
CODE:
htmlheadtitleLogin/title
/head
body
?php
$conn = user=auth password=redhat
dbname=auth host=localhost port=5432;
Can you log into the PostgreSQL server from the console or command line?
Are you sure you are using the right username, password or host?
-Original Message-
From: Thomas Bonham [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 26, 2005 8:03 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB]
I think so.
I'm going to go there my book (agin) and I'm also going to ask the head
IT guy.
Thanks for all of your help!
Thomas
Robbert van Andel wrote:
Can you log into the PostgreSQL server from the console or command line?
Are you sure you are using the right username, password or host?
Just a quick reply. No I am not from NZ if you were asking me, which I don't
think you were because my email states I am from Australia. Just thought I'd
make that said.
Thanks for your informative response.
J
Date:
Sun, 26 Jun 2005 14:05:13 -0500From:Martin Norland [EMAIL
21 matches
Mail list logo