Re: [PHP-DB] Joining Tables for Search

2004-07-26 Thread Pablo M. Rivas
Hello Harry, you can use left join: http://dev.mysql.com/doc/mysql/en/JOIN.html $query = SELECT members.id, firstname, familyname, middlename, fathername, region3.region3, region4, members.country, country.countryname, MATCH(firstname, middlename, familyname,

[PHP-DB] Empty query result

2004-07-26 Thread Philip Thompson
Hi all. I am querying a database of single information multiple times using a simple 'select' statement. However, whenever the data in the DB is empty or is 0 (zero), then it throws an error. However, I don't want it to throw an error, I just want it to move on to the next query. This is being

[PHP-DB] Re: Unable to parse message

2004-07-26 Thread Justin Patrin
What mail program are you using? I'm getting mail parsing errors. In addition, you have your From set as: Harry G harry (removethis)@gabha.net Likely, ( and ) aren't supposed to be in there (invalid chars) and it also makes it impossible to reply to you. There is no other from or reply to in

Re: [PHP-DB] Empty query result

2004-07-26 Thread Philip Thompson
Pablo, Hello Philip, pse.. can you paste the error information? There is no known empty set problem. Here's my function: function getMysqlSelectResultForUsername($identifier, $userName, $link) { $queryResult = mysql_query(select $identifier from theTable where username = '$userName',

Re: [PHP-DB] Empty query result

2004-07-26 Thread bbonkosk
Why not...?? if (!($queryResult = mysql_result($queryResult, 0))) { return 0; } - Original Message - From: Philip Thompson [EMAIL PROTECTED] Date: Monday, July 26, 2004 12:57 pm Subject: Re: [PHP-DB] Empty query result Pablo, Hello Philip, pse.. can you paste the

Re: [PHP-DB] Empty query result

2004-07-26 Thread Pablo M. Rivas
Hello Philip, pse.. can you paste the error information? There is no known empty set problem. -- Best regards, Pablo PT Hi all. PT I am querying a database of single information multiple times using a PT simple 'select' statement. However, whenever the data in the DB is PT empty or

Re: [PHP-DB] Empty query result

2004-07-26 Thread Jason Wong
On Tuesday 27 July 2004 00:57, Philip Thompson wrote: Here's my function: function getMysqlSelectResultForUsername($identifier, $userName, $link) { $queryResult = mysql_query(select $identifier from theTable where username = '$userName', $link); if (!($queryResult =

Re: [PHP-DB] Empty query result

2004-07-26 Thread Philip Thompson
Thanks all! I will try some of the suggestions that you guys gave. I appreciate it. ~Philip On Jul 26, 2004, at 12:52 PM, Pablo M. Rivas wrote: Hello Philip, read: http://www.php.net/manual/en/function.mysql-result.php when you do $queryResult = mysql_result($queryResult,0) you

[PHP-DB] Re: Unable to parse message

2004-07-26 Thread Harry G
You should remove (removethis) to send via email. This is just a precaution because often Newsgroups are scanned for email address and added spammers list. Just want to avoid that. Justin Patrin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What mail program are you using? I'm

Re: [PHP-DB] Joining Tables for Search

2004-07-26 Thread Harry G
Thanks Pablo, that worked. Pablo M. Rivas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Harry, you can use left join: http://dev.mysql.com/doc/mysql/en/JOIN.html $query = SELECT members.id, firstname, familyname, middlename, fathername,

[PHP-DB] Match Against Query with Integers

2004-07-26 Thread Harry G
Hi Here's the senario... Table 1- members id - firstname - middlename - - country - region3 Fields country and region3 hold the integer codes for country and region3 is state Table 2- country id - countryname Countryname is where the actual Country name is stored and id is the country code