Re: [PHP-DB] I can't seem to get Max() to work

2004-10-28 Thread Robby Russell
On Thu, 2004-10-28 at 01:05 -0400, Chris Payne wrote: Hi there everyone, I cant seem to get the below to work with PHP and MySQL: $sql = SELECT MAX(FoodItemNumber) FROM menuitemsubs; What am I doing wrong? I need the highest number from the column FoodItemNumber, but it

RE: [PHP-DB] Re: I can't seem to get Max() to work

2004-10-28 Thread balwantsingh
can anybody advise if there is any command so that MAX can be found in the data entered the columns. i mean to say suppose i have three columns col1 col2 col3 in a table now the MAX value to find from col1, col2, col3. with best wishes balwant -Original Message- From: David Robley

[PHP-DB] Re:Subject: Finding the highest number in a column?

2004-10-28 Thread Neil Smith [MVP, Digital media]
Surely some monday morning light headedness Chris ! SELECT MAX(column_name) AS max_number FROM table Make sure the column's indexed if you do it often ! Cheers - Neil At 03:32 28/10/2004 +, you wrote: Message-Id: [EMAIL PROTECTED] From: Chris Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date:

RE: [PHP-DB] I can't seem to get Max() to work

2004-10-28 Thread Bastien Koert
is it an iteger type datafield? bastien From: Chris Payne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] I can't seem to get Max() to work Date: Thu, 28 Oct 2004 01:05:46 -0400 Hi there everyone, I can’t seem to get the below to work with PHP and MySQL: $sql = SELECT

AW: [PHP-DB] I can't seem to get Max() to work

2004-10-28 Thread Lars Hilsebein
How about the following statement (Not the best way, but it could solve your problem): $sql = SELECT FoodItemNumber FROM menuitemsubs ORDER BY FoodItemNumber DESC LIMIT 1 -Ursprüngliche Nachricht- Von: Bastien Koert [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 28. Oktober 2004

RE: [PHP-DB] slow connection 2 DB2 database on as400.

2004-10-28 Thread Ian . McGhee
Hi I have been trying to connect to a DB2 database on an IBM AS400 system. I manage to get connected using ODBC however it is slow at connecting and every time the page is refreshed it seems to have to connect again. Any help would be appreciated. I use the below code to connect. In a file called

[PHP-DB] returning inserted ids using load data local infile

2004-10-28 Thread blackwater dev
Is there anyway to get an array of the inserted id's generated when I load data into mysql using an external data file??? Thanks! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] returning inserted ids using load data local infile

2004-10-28 Thread Bastien Koert
For bulk loads, its proably best to query the db for the max id number before the load starts and then do the same after... last_insert_id only returns the last inserted id Bastien From: blackwater dev [EMAIL PROTECTED] Reply-To: blackwater dev [EMAIL PROTECTED] To: [EMAIL PROTECTED]

RE: [PHP-DB] Time Field

2004-10-28 Thread NIPP, SCOTT V \(SBCSI\)
Why would you not simply use a 'datetime' field type? This gets you exactly what you are looking for unless I am misreading what you are doing here... Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -Original Message- From:

RE: [PHP-DB] Time Field

2004-10-28 Thread Bastien Koert
Best to use int field type and store the difference between the unix timestamp start time and the unix timestamp end time (both seconds since the epoch) which would be the number of seconds it took to complete the task. This number can then be manipulated with math to provide elapsed times in

[PHP-DB] error:attempt to write a readonly database

2004-10-28 Thread Aravalli Sai
hi i am getting the following error when i try to run my php program..i want to know wht is this error in general Warning: sqlite_query(): attempt to write a readonly database in /home/saravall/.HTML/inv.php on line 26 error:attempt to write a readonly database thanks sai

RE: [PHP-DB] error:attempt to write a readonly database

2004-10-28 Thread Graham Cossey
[snip] hi i am getting the following error when i try to run my php program..i want to know wht is this error in general Warning: sqlite_query(): attempt to write a readonly database in /home/saravall/.HTML/inv.php on line 26 error:attempt to write a readonly database [snip] Looks

[PHP-DB] PHP does not show errors

2004-10-28 Thread Andre Matos
Hi List, I have developed some classes to access MySQL. When I was testing the classes, I always got a blank page. I found some errors and fix them. However, I realized that my PHP was not showing me the errors that occur inside the classes. I have checked on php.ini and I have this setup:

RE: [PHP-DB] PHP does not show errors

2004-10-28 Thread Bastien Koert
post code, what are we, mindreaders? bastien From: Andre Matos [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP does not show errors Date: Thu, 28 Oct 2004 17:48:56 -0400 Hi List, I have developed some classes to access MySQL. When I was testing the classes, I always got a blank

Re: [PHP-DB] MySQL backup software

2004-10-28 Thread Leo G. Divinagracia III
Perry, Matthew (Fire Marshal's Office) wrote: Does anyone know a free MySQL backup program to schedule regular backups? mysql has the ADMINISTRATOR, well at least for win32... does timed backups. -- Leo G. Divinagracia III [EMAIL PROTECTED] z -- PHP Database Mailing List

[PHP-DB] using php to insert xml into database

2004-10-28 Thread mishin coleman
any ideas how to do this? i can get the php to print out all the details of the xml but not sure how to input that data into a database. - maybe using some sort of array? its an annoying postgresql database that i need to insert it into but any ideas on how to insert into any database would be

[PHP-DB] using php to insert xml data into database (text)

2004-10-28 Thread mishin coleman
sorry may have sent the html version last time any ideas how to do this? i can get the php to print out all the details of the xml but not sure how to input that data into a database. - maybe using some sort of array? its an annoying postgresql database that i need to insert it into but any