[PHP-DB] updateable cursors in db2 via odbc_exec call?

2003-06-16 Thread Robert Bedell
I've noticed that the odbc_exec call appears to call SELECT statements as updateable in db2. Is there then a way to update each row of the response (an updateable cursor)? Any thoughts would be appreciated. thanks Rob -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Jason Wong
On Tuesday 17 June 2003 14:16, Martin E. Koss wrote: > Error found when testing the code below: > Warning: Variable passed to each() is not an array or object in > apache/htdocs/speeddials.php on line 11 > Line 11 is: "while ($record_set_array = each($result_set)) {" > > $result_set = mysql_query(

[PHP-DB] Re: sqlconnect garbage while connecting with db2

2003-06-16 Thread Robert Bedell
Ok, I put in the environment variables LIBPATH=/home/db2/sqllib/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/db2/sqllib/lib VWSPATH=/home/db2/sqllib VWS_LOGGING=/home/db2/sqllib/logging VWS_TEMPLATES=/home/db2/sqllib/templates DB2INSTANCE=db2 (basically, I ran the ~db/sqllib/db2profile command

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Ramil G. Sagum
do a var_dump($result_set) to see what $result_set contains (if it's actually and array. (did you implement the code given as is? if not AND you have put line-11 in a function and $result_set as a global variable then you need to define $result_set as a global inside the function.) ramil On Tu

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Martin E. Koss
Error found when testing the code below: Warning: Variable passed to each() is not an array or object in apache/htdocs/speeddials.php on line 11 Line 11 is: "while ($record_set_array = each($result_set)) {" What did I do wrong? Thanks Martin -Original Message- From: [EMAIL PROTECTED] [ma

[PHP-DB] sqlconnect garbage while connecting with db2

2003-06-16 Thread Robert Bedell
Hi, I don't read this often so please reply to my email: [EMAIL PROTECTED] I'm using PHP 4.3.1 with DB2 8.1 on RedHat 8.0. I compiled against DB2 fine, with no problems. I connect using db2 with no problems - the 'test' database is perfectly catalogued. However when I try to run the below page

Re: [PHP-DB] PHP Install conflicts w/ MySQL

2003-06-16 Thread Doug Thompson
Check that mysql is still the owner of its subdirectories. You might also look on the mysql list for other possibilities as this is a frequent topic. Doug On 17 Jun 2003 10:02:29 +0800, Ramil G. Sagum wrote: > >On Tue, 2003-06-17 at 03:08, Nathan wrote: > >> # ./bin/mysqld_safe & >> Starting

Re: [PHP-DB] Get last id in postgresql

2003-06-16 Thread Ramil G. Sagum
pg_last_oid returns the last object id (an id used in the system catalogs) and not the ID/index of the row. if you need to get the last ID, you need to execute another select or write a pl/sql function. On Tue, 2003-06-17 at 10:13, Norma Ramirez - TECNOSOFT wrote: > Hi all, > I´m starting with

[PHP-DB] Get last id in postgresql

2003-06-16 Thread Norma Ramirez - TECNOSOFT
Hi all, I´m starting with posgresql and i trying to use pg_last_oid to get the last id in a insert query, but this function returns me a big number like 21318 and bigger, but the table just have 3 or 4 records. Could some one help? Any ideas? This is the script i´m using $insert = "insert into t

Re: [PHP-DB] PHP Install conflicts w/ MySQL

2003-06-16 Thread Ramil G. Sagum
On Tue, 2003-06-17 at 03:08, Nathan wrote: > # ./bin/mysqld_safe & > Starting mysqld daemon with databases from /var/lib/mysql > 030616 12:04:24 mysqld ended > > I'm running the command as root so I don't think it's a permission issue. Does > anyone know anything about the PHP install that wo

Re: [PHP-DB] setting session variables via a form

2003-06-16 Thread Becoming Digital
It's always something obvious. I was not checking the session variable's value at the correct point in the script, hence the display was not being altered by its results. I've managed to get my code to display properly now, but I can't retain state between queries. My reason for using session va

Re: [PHP-DB] query selection

2003-06-16 Thread CPT John W. Holmes
> the first list that is displayed has an ID for each product. But when I > click on it, it goes to the next page but does not display the rest of the > products that are listed in the second table. > > $query = "SELECT * FROM product_list WHERE productid = id"; > > Id being the description ID t

[PHP-DB] PHP Install conflicts w/ MySQL

2003-06-16 Thread Nathan
Hello, I just installed PHP 4.3.2 on my machine running redhat 7.2. The install seems like it went well. However, I've been running MySQL (Ver 11.18) just fine until I installed PHP and now it won't start at all. When I try to start the mysql daemon from the command line, I just get... # ./

RE: [PHP-DB] query selection

2003-06-16 Thread Ryan Holowaychuk
Sorry forgot to state the question. No bids. Looking for help. the first list that is displayed has an ID for each product. But when I click on it, it goes to the next page but does not display the rest of the products that are listed in the second table. $query = "SELECT * FROM produ

Re: [PHP-DB] query selection

2003-06-16 Thread CPT John W. Holmes
Okay... and? Do you have a question? Are you wanting us to write this for free? Do you want bids on the project? ---John Holmes... - Original Message - From: "Ryan Holowaychuk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 16, 2003 2:30 PM Subject: [PHP-DB] query selecti

[PHP-DB] query selection

2003-06-16 Thread Ryan Holowaychuk
I have a databae built, at the moment it has two tables. The first table has 2 fields, an ID and description. This is for a listing of all the different samples that we have at the company. When the user clicks on the description they want, it will open another page that will show all the item

Re: [PHP-DB] setting session variables via a form

2003-06-16 Thread . ma
hi! i know that it sends everything to itself if you omitt the action-attribute, but it isn't propper html strict anymore... (ok - thats not a big problem *g*) maybe it helps if you put the testing in a place of the script where there was no output yet (also no whitespaces)? at least this is a

Re: [PHP-DB] setting session variables via a form

2003-06-16 Thread Becoming Digital
> maybe try the invers (anyways you havn't defined an action-attribute - > maybe this is a problem?): Not declaring an action attribute automatically makes the form submit to itself. When a URL query string is involved, this works much better than $_SERVER['PHP_SELF'], which reduces the URL to its

Re: [PHP-DB] setting session variables via a form

2003-06-16 Thread Becoming Digital
> Are you certain that you have issued the session_start() call at the > beginning of the page? 100%. I went so far as to move session_start() before every other element on the page, even removing it from my include file and directly inserting it into the actual page. > Furthermore, your registe

[PHP-DB] RE: Problem with 4.3.2

2003-06-16 Thread Ryan Jameson (USA)
Funny you should ask. I actually didn't try it on anything else. So I went back and tried a simple script and got the same message. Thanks for the idea. I haven't gotten any other feedback on this. <>< Ryan -Original Message- From: Jacob Marble [mailto:[EMAIL PROTECTED] Sent: Friday, J

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread jeffrey_n_Dyke
$qry = "SELECT * FROM TABLE_NAME"; $result_set = mysql_query($qry) or die(mysql_error()); ***this has to be called before any headers are written to the browser. *** header("Content-type: application/csv"); header("Content-Disposition: attachement; filename="YOURFILENAME.csv"); while ($record_se

RE: [PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Martin E. Koss
I've heard or read about the headers somewhere but right now I sure could use pointing in the direction of a step-by-step tutorial for extracting my data into a CSV file and, of course, setting up the PHP file to handle it correctly. Thanks Martin -Original Message- From: Dillon, John [m

RE: [PHP-DB] setting session variables via a form

2003-06-16 Thread Ford, Mike [LSS]
> -Original Message- > From: Hutchins, Richard [mailto:[EMAIL PROTECTED] > Sent: 16 June 2003 17:08 > > session_start(); > session_register("isRegistering"); > > $_SESSION["isRegistering"] = "true"; B't! If you're using the $_SESSION array, then you MUST NOT use s

RE: [PHP-DB] setting session variables via a form

2003-06-16 Thread Hutchins, Richard
Edward, Are you certain that you have issued the session_start() call at the beginning of the page? According to the session stuff on PHP.NET, you need to make sure you have session_start() at the top of the page before you do anything else with the session. For example, I have on one of my simple

Re: [PHP-DB] setting session variables via a form

2003-06-16 Thread . ma
hi maybe try the invers (anyways you havn't defined an action-attribute - maybe this is a problem?): if(!isset($_SESSION['item_details']) || ( isset($_SESSION['item_details'] && $_SESSION['item_details']) { echo ''. ''. ''. ''; else $_SESSION['item_details'] = 'yes'; hope i underst

[PHP-DB] setting session variables via a form

2003-06-16 Thread Becoming Digital
Despite my best efforts, I can't seem to set session variables via a basic form. I'm trying to use a button to alter display settings, which should be a simple task, but apparently it is not. Here's the code I'm working with. "; print ""; print ""; } else $_SESSION['item_detai

Re: [PHP-DB] ODBC equiv for mysql_insert_id

2003-06-16 Thread CPT John W. Holmes
> I am connecting to MySQL (4.1) using ODBC (I have my reasons) and am looking > for an equivalent to the mysql_insert_id() function so that I can get the ID > of the record just created. You could always just issue a SELECT LAST_INSERT_ID() query and get the resulting number that way. ---John Ho

[PHP-DB] Save mySQL data into a CSV file.

2003-06-16 Thread Martin E. Koss
Hi, I have a table with 1,008 columns in it and at it's peak it has up to 500 rows of data. I want to enable my client to click on a link and the next thing they are prompted with is 'Save or Open' (the CSV file). The data will be compiled into a comma delimited CSV file but rather than be printed

RE: [PHP-DB] PHP transfer variable question?????

2003-06-16 Thread Hutchins, Richard
Sorry for the delayed response. Not sure I quite understand your problem here. When you say: >But when I turned register_globals On in PHP.ini and don't use > $_GET['id'], > echo $querystring in show.php file display empty: > SELECT * FROM news_tb WHERE id='' If you have indeed turned regis

[PHP-DB] Re: Displaying 10 records per page

2003-06-16 Thread David
Dear Mike and Nabil Thank you for your help. Regards David Anagram Systems "David" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear All > > I am writing a support pages for my company at present. I would like to > display 10 records per page, e.g. like google does it, and if t

[PHP-DB] ODBC equiv for mysql_insert_id

2003-06-16 Thread George Pitcher
Hi, I am connecting to MySQL (4.1) using ODBC (I have my reasons) and am looking for an equivalent to the mysql_insert_id() function so that I can get the ID of the record just created. Cheers George -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP-DB] Re: Displaying 10 records per page

2003-06-16 Thread nabil
check this out :)) http://www.phpfreaks.com/print.php?cmd=tutorial&tut_id=43 Nabil "David" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear All > > I am writing a support pages for my company at present. I would like to > display 10 records per page, e.g. like google does it,

RE: [PHP-DB] Calculating Time

2003-06-16 Thread Snijders, Mark
check the mktime() function :-) -Original Message- From: Delz [mailto:[EMAIL PROTECTED] Sent: maandag 16 juni 2003 11:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] Calculating Time Hi All, How do I calculate time using php? Let's say I want to know the difference between 12:30PM & 13:30P

[PHP-DB] Displaying 10 records per page

2003-06-16 Thread David
Dear All I am writing a support pages for my company at present. I would like to display 10 records per page, e.g. like google does it, and if there are more than 10 then a next | previous button appears at the bottom. Has anybody have experience of this and be able to give me some ideas, e.g. usi

Fwd: [PHP-DB] Calculating Time

2003-06-16 Thread . ma
take a look at http://www.php.net/function.mktime .ma e: [EMAIL PROTECTED] w: http://www.abendstille.at # life would be easier if i knew the source code Am Montag, 16.06.03 um 11:21 Uhr schrieb Delz: Hi All, How do I calculate time using php? Let's say I want to know the difference between 12

[PHP-DB] Calculating Time

2003-06-16 Thread Delz
Hi All, How do I calculate time using php? Let's say I want to know the difference between 12:30PM & 13:30PM? Hope someone can give me an idea? Delz -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] php_mssql.dll

2003-06-16 Thread Peter Monk
Louai wrote: I got the following error when I tried to connect to MS SQL server: Unknown () mssql: unable to initialize module Please advise You could try checking that your extension_dir path in php.ini is set up correctly. Peter. -- PHP Database Mailing List (http://www.php.net/) To unsubscrib