[PHP-DB] Re: MySQL - Left Join Question

2002-06-26 Thread user
You might think about adding comparison operators to the statement to help narrow the search. i.e. A LEFT JOIN B ON a.id = b.id WHERE a.value = b.value AND a.value2 = b.value2 OR a.value3 = b.value3 The MySQL website provides

[PHP-DB] prevent results

2002-06-26 Thread Martin Adler
Hi, unfortunately I still stand before the same problem is it possible to force mysql in a SELECT clause depend on a condition to prevent results? I would be happy and grateful for every help OK here is my Query SELECT entries.id, entries.head, entries.date, entries.author, (catgroup.gid IS

[PHP-DB] converting a string to a date

2002-06-26 Thread Seth Yount
I am trying to find an example of converting a string to a date format suitable for MySQL input. for example... ' 2002 March 15 ' needs to be converted to ' 02-03-15 ' I can reverse this process fine, but am having trouble doing it this way -- Seth -- PHP Database Mailing List

[PHP-DB] PHPed and DBG

2002-06-26 Thread Dib, Walid (MED, Stagiaire GEMS)
Hello, I downloaded the application PHPEd and DBG, I need débugger but I cannot bind the two applications is what somebody has an idea. Thank you in advance -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: converting a string to a date

2002-06-26 Thread Seth Yount
My fault... wasn't looking hard enough i guess, thats what 2 a.m. will do to you I guess. here is how to do it, for anyone who finds themselves in a similar situation: $result = date( y m d, strtotime($aDay $aMonth $aYear)); echo $result; Seth Yount wrote: I am trying to find an

Re: [PHP-DB] Form not working...

2002-06-26 Thread Adam Royle
What you said (Mike) is mostly correct, although the GetSQLValueString() function in Scott's code automatically puts the quotes around the values if the datatype definition of text is passed to the function. Adam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] PHPed and DBG

2002-06-26 Thread Pierre-Alain Joye
On Wed, 26 Jun 2002 10:41:26 +0200 Dib, Walid (MED, Stagiaire GEMS) [EMAIL PROTECTED] wrote: Hello, I downloaded the application PHPEd and DBG, I need débugger but I cannot bind the two applications is what somebody has an idea. Thank you in advance I did not use DBG on

Re: [PHP-DB] Form not working...

2002-06-26 Thread Pierre-Alain Joye
On Wed, 26 Jun 2002 19:11:46 +1000 Adam Royle [EMAIL PROTECTED] wrote: What you said (Mike) is mostly correct, although the GetSQLValueString() function in Scott's code automatically puts the quotes around the values if the datatype definition of text is passed to the function. Adam the

Re: [PHP-DB] PHPed and DBG

2002-06-26 Thread Pierre-Alain Joye
On Wed, 26 Jun 2002 10:41:26 +0200 Dib, Walid (MED, Stagiaire GEMS) [EMAIL PROTECTED] wrote: Hello, I downloaded the application PHPEd and DBG, I need débugger but I cannot bind the two applications is what somebody has an idea. Thank you in advance the link to the forum :

[PHP-DB] Sybase problem.

2002-06-26 Thread Gural
Hello, I have problem with Sybase. When I try to get data from binary column using sybase_query, the output consist of 4, most significant digits only, wheras the rest is omitted. My PHP script looks like follows: ? $conn = sybase_connect ( . , ... ,

[PHP-DB] Re: prevent results

2002-06-26 Thread Martin Adler
Hi, i found a solution by myself i think it's very complex but may help others for finding solutions Thats the query: SELECT entries.id, entries.head, entries.date, entries.author FROM entries LEFT JOIN category ON entries.cat_no REGEXP CONCAT(\\.,category.id,(\\.|$)) LEFT JOIN entgroup ON

Re: [PHP-DB] Why do these values not match?

2002-06-26 Thread Manuel
Any idea why this problem does not manifest itself in Foxpro, Excel or Visual Basic? Pierre-Alain Joye wrote:On Tue, 25 Jun 2002 18:14:13 -0700 wrote: IEEE standard is precision to 6 decimal places. Having an epsilon of 2 is ridiculously small, and well under the IEEE / ANSI standard.

Re: [PHP-DB] Why do these values not match?

2002-06-26 Thread Pierre-Alain Joye
On Wed, 26 Jun 2002 06:52:14 -0700 (PDT) Manuel [EMAIL PROTECTED] wrote: Any idea why this problem does not manifest itself in Foxpro, Excel or Visual Basic? This problem happens also with VB. But later :), By example if you use decimal type, smallest non-zero number is

[PHP-DB] OSCON: anybody interested in my Oracle talk?

2002-06-26 Thread Thies C. Arntzen
hi, seems like oreilley will cancel my tutorial about PHP and Oracle at OSCON in san diego as there are not enough ppls interested. so - if you go to oscon, and if you are interested in that subject _and_ if you have not decided to sign up for my tutorial - hurry up

Re: [PHP-DB] OSCON: anybody interested in my Oracle talk?

2002-06-26 Thread Pierre-Alain Joye
Hello, I m sure I will not be in OSCON, but if there is a possibily for you to go to International PHP Conf, you will make certainly a very good session there, not lost your job and certainly see me ;)). International PHP Conference 2002 call for papers :

Re: [PHP-DB] Re: Question

2002-06-26 Thread Mike Tuller
Thanks for all of the advice. I am learning, and want to learn the right way, and all the advice given will benefit me greatly in the long run. I wish there was an easier way to deal with relationships in MySql, but I am sure that will come along in time. Mike From: Tracker 1 [EMAIL PROTECTED]

[PHP-DB] Populating a dropdown list with ENUM values...

2002-06-26 Thread NIPP, SCOTT V (SBCSI)
I am working on an application that has several different fields that are populated dropdown lists. In every case, this data is simply data from a MySQL table column and works great. I have run into a new difficulty though... One field that I am wanting to populate in a dropdown list

RE: [PHP-DB] Populating a dropdown list with ENUM values...

2002-06-26 Thread Cosby, Christopher
Did you see the very last user contributed comment at http://www.php.net/manual/en/function.mysql-fetch-field.php? It'll help you immensely. Christopher S. Cosby SciCare Software Services 770.236.1128 -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent:

[PHP-DB] Last ID from database?

2002-06-26 Thread Chris Payne
Hi there everyone, How Can I grab just the LAST ID from a database in MySQL with PHP easily? Thanks you :-) Chris --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

RE: [PHP-DB] Last ID from database?

2002-06-26 Thread Hutchins, Richard
Chris, $insertID = mysql_insert_id(); Check http://www.php.net/manual/en/function.mysql-insert-id.php for additional info. Rich -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Last

RE: [PHP-DB] Last ID from database?

2002-06-26 Thread Ryan Jameson (USA)
-Original Message- From: Ryan Jameson (USA) Sent: Wednesday, June 26, 2002 1:59 PM To: 'Chris Payne' Subject: RE: [PHP-DB] Last ID from database? It depends on if you just inserted it, if you did: mysql_insert_id if not, you'll need to do a query for SELECT max(ID) as lastID from

Re: [PHP-DB] Last ID from database?

2002-06-26 Thread Juan Pablo Aqueveque
$sql= SELECT ID FROM table_name ORDER BY ID DESC limit 1 . .. ... -- jp At 15:56 26/06/02, Chris Payne wrote: Hi there everyone, How Can I grab just the LAST ID from a database in MySQL with PHP easily? Thanks you :-) Chris --- Outgoing mail is certified Virus Free. Checked by AVG

Re: [PHP-DB] Last ID from database?

2002-06-26 Thread Devrim GUNDUZ
Hi Chris, On Wed, 26 Jun 2002, Chris Payne wrote: Hi there everyone, How Can I grab just the LAST ID from a database in MySQL with PHP easily? ? If(last id == max id) { // then use this query: SELECT max(id) from my_table; } else if (last id == the last data in the

RE: [PHP-DB] Last ID from database?

2002-06-26 Thread Cosby, Christopher
-Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Last ID from database? Hi there everyone, How Can I grab just the LAST ID from a database in MySQL with PHP easily? Which LAST

[PHP-DB] PHP and msql Error

2002-06-26 Thread comp boy
I am getting the following error: Warning: Supplied argument is not a valid mSQL result resource in /usr/local/apache/htdocs/inc/listings.inc on line 24 listings.inc: 24 $numRows = msql_numrows( $result ); The manual on php.net says that it takes no variables msql_numrows(void)

RE: [PHP-DB] Last ID from database?

2002-06-26 Thread Jeffrey_N_Dyke
This is how i do the same thing as i belive you're asking. $result = mysql_query(select max(id) from [table]); $lastID = mysql_result($result, 0); Hope this helps Jeff

RE: [PHP-DB] PHP and msql Error

2002-06-26 Thread Peter Lovatt
Hi With MySql that means that there is no result returned. Usually SQL error, but could be a setup problem if you have not run any queries succesfuly. Not sure if the same applies to MSql, but try echoing the error, echo msql_error($conn) (if it is the same as MySql) HTH Peter

[PHP-DB] Re: Populating a dropdown list with ENUM values...

2002-06-26 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am working on an application that has several different fields that are populated dropdown lists. In every case, this data is simply data from a MySQL table column and works great. I have run into a new difficulty though...

RE: [PHP-DB] Populating a dropdown list with ENUM values...

2002-06-26 Thread Russ
G'day Scott: I wrote this function to do just what you're atfer: You may need to mess with it for you're own needs - but go for your life! //function: enum_select() - automatically generate an HTML select menu from a MySQL ENUM field //1). takes a table name: '$table' //2). a name

RE: [PHP-DB] Populating a dropdown list with ENUM values...

2002-06-26 Thread NIPP, SCOTT V (SBCSI)
Thanks to everyone who responded. I have found a function that fills the role perfectly. -Original Message- From: Russ [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 7:47 PM To: NIPP, SCOTT V (SBCSI); [EMAIL PROTECTED] Subject: RE: [PHP-DB] Populating a dropdown list

[PHP-DB] subtracting one query from the other

2002-06-26 Thread Harpreet Kaur
Please help, I am stuck and my mind is frozen. I want to subtrack one query from the other. I have one query that brings all the records. The second gets another set of records. I want to subtract the second query from the first one . How do i do this? First query produces like 1000 records.