Try
"SELECT TableA.Category, TableB.PersonID
FROM TableA LEFT JOIN TableB ON (TableA.CategoryID = TableB.TableAID)
WHERE TableB.ClientID = $cid
ORDER BY TableA.Category ASC"
LEFT JOIN states that you should return all "TableA," inserting NULL for TableB
if there is no match.
'Luck
-Szii
Peter,
I've you tried doing a inner join, left outer join, right outer join?
What db program are you using?
Could you post what your current select statement looks like?
Mike
- Original Message -
From: "Peter Westergaard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April
I'm trying to perform a "join" that seems like it should be simple, but I'm just
ending up in a morass. Hopefully someone who's standing a step or two back from the
problem can help me solve this one...
What I have:
Table A (Category): with a 3-tier category structure:
-Nature
-Category
-Sub-
I had this exact same problem and after a lot of time I switched to an ODBC
connection (no mssql_connect... Just use the ODBC commands) and everything
has worked flawlessly since.
There's probably some right combination and way to use the mssql specific
commands but life it too short and the ODB
You could try:
SELECT users.Name, Files.Filename
FROM Files
LEFT JOIN users ON Files.Userid = users.Id
GROUP BY Files.Userid
ORDER BY Files.Stamp DESC
I'm not sure if this would work, depends on if MySQL ORDER's before GROUP.
You could try it though. Capitolization may be incorrect, I t
I have 2 tables, 'users' and 'files' (defined below)
Can I construct a single SELECT statement so that it will return ONLY
users that have files and ONLY the last file that the user has? So it
would return 1 row per user containing their most recent file.
users
Id int
Name
should give you all of the info you need.
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
-Original Message-
From: Rob Day [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 9:29 PM
To: 'Craig Vincent'; [EMAIL PROTECTED]
Thanks, Craig. That was exactly what I was looking for!
-Rob
-Original Message-
From: Craig Vincent [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 2:35 PM
To: Rob Day; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] IP Address?
> How can I find out the IP address of the client requesti
> How can I find out the IP address of the client requesting a
> given php file?
> I know that you can use $HTTP_SERVER_VARS["REMOTE_ADDR"] in more recent
> versions of PHP. Unfortunately, we only have PHP3.0.14 and I don't think
> that this option is available in our ancient version. I also can't
How can I find out the IP address of the client requesting a given php file?
I know that you can use $HTTP_SERVER_VARS["REMOTE_ADDR"] in more recent
versions of PHP. Unfortunately, we only have PHP3.0.14 and I don't think
that this option is available in our ancient version. I also can't use
serve
A combination of strtotime() and date() can make this easy.
date("Y-m-d", strtotime($birthday))
Or see docs and comments at
http://www.php.net/manual/en/function.strtotime.php
-Steve
On Friday, April 19, 2002, at 01:29 PM, Brandon Paul wrote:
> Hey all,
>
> I have a credit application form,
On Fri, 19 Apr 2002, Brandon Paul wrote:
> going about it wrong? Any help would be greatly appreciated.
1) Validate that the input is correct.
2) Tokenize the string based on the /s
3) Re-format the date.
Or, use the date functions - I'd swear one of them can re-write dates.
--
PHP Database
Hey all,
I have a credit application form, and one of the required elements is the
applicant's Date of Birth. I have "creditapp" table with a "birthdate"
field and it is a DATE datatype. On the form, I want to be able to have
them enter their Date of Birth as "mm/dd/" and have it go into th
How about this incorporated somewhere:
$s = (SERVER_PROTOCOL == "HTTP/1.0") ? "Pragma: no-cache" : "Cache-Control:
no-cache, must-revalidate";
header($s);
This code must be at the start of the script BEFORE anything is output to
the browser - as it sends an additional HTTP header (hence the fun
Hi PHP Is quite cool isn't it As for your problem you might want to try
a few things:
- Running PHP as the ISAPI module & make sure you have the latest version
(you should get the latest version anyway).
- Removing this line : $r = mssql_rows_affected ( $link); - as there is a
mysql function
Have you tried removing the [] brackets? And what is ReferencesComplete - a
standard table, a view or a stored procedure?
Ollie
-Original Message-
From: Hermann Otteneder [mailto:[EMAIL PROTECTED]]
Sent: 17 April 2002 16:30
To: [EMAIL PROTECTED]
Subject: troubles with select * from... t
Background:
Server version: Apache/1.3.24 (Darwin)
MySQL: Ver 8.23 Distrib 3.23.49, for apple-darwin5.2 on powerpc
PHP version 4.1.2 from the Darwin CVS repository
--
After much hassle and grief, I was able to make and install PHP 4.1.2
from the Darwin CVS source repository using this configur
Instead of suppressing the error message using the @ sign, why not
remove it and your die() statement and see what error is produced on
your live server?
HTH
--Sam
-Original Message-
From: Ciprian Trofin [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 6:29 AM
To: [EMAIL PROTE
> Monday is an awful way to spend 1/7th of your life.
a> try double quote instead single quote.
a> $dbserver = "server";
Tried that, no effect.
--
Ciprian
> Oxymoron: Government budget
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/uns
Ciprian Trofin <[EMAIL PROTECTED]> wrote on 4/19/2002
5:29:00 PM:
>
>> Bisexuality doubles the chance of getting a date.
>
>
>Hi All!
>In order to make my job easy, a choose the following approach:
>
>settings.php
>$dbserver = 'server';
>$dbname = 'name';
>$dbpass = 'password';
>
On Friday 19 April 2002 18:29, Ciprian Trofin wrote:
> > Bisexuality doubles the chance of getting a date.
>
> Hi All!
> In order to make my job easy, a choose the following approach:
>
> settings.php
> $dbserver = 'server';
> $dbname = 'name';
> $dbpass = 'password';
> ?>
>
> mai
> Bisexuality doubles the chance of getting a date.
Hi All!
In order to make my job easy, a choose the following approach:
settings.php
main_file.php
On the test machine (Windows 98, PHP Triad 221 - PHP 4.1.0) it works;
when I put the project online, it doesn't (the
Dear All,
I hope somebody can help me. I am new to PHP (I've used ASP for three
years:-( ) and I'm loving PHP and trying to get my work to convert but
I've coming across a error with mssql_query() explorer its just crashes
with a php.exe 'memory could not be read error'. I'm sure it a school
boy e
23 matches
Mail list logo