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. Se
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 w
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
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.
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
---
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
> -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?
Whi
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?
http://devrim.oper.metu.edu.tr
-
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe,
$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.
>Check
-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 Ta
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 I
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
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)
howeve
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
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 is
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 PROTECT
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 :
http://www.phpconference.de/2002/kt/i
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
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 +/-0.
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.
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 e
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:
";
sybase_select_db ( "my_db", $conn);
$
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
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.
>
> A
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 DB
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: htt
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 fin
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
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 (http://www.p
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 NUL
30 matches
Mail list logo