[PHP-DB] session and form

2002-10-07 Thread Smita Manohar
hiii all, i've posted this question some days back. but didnt find answer. so posting it again. in my phpscript, some users are allowed to del/modify contents of the database. for this they have been provided login name and password, after user loggs into the secure area, session starts.

RE: [PHP-DB] a where clause question

2002-10-07 Thread Walter, Marcel
Hi Alex, I believe your database-design is not good ... think about a re-design or send us some info about your tables. Maybe we find a better solution... Regards, Marcel -Original Message- From: Alex Shi [mailto:[EMAIL PROTECTED]] Sent: 06 October 2002 22:43 To: [EMAIL PROTECTED]

RE: [PHP-DB] possible Error in Querydefiniton

2002-10-07 Thread Ruprecht Helms
Hi John W. Holmes, You can find out why with mysql_error(), but it's probably because you haven't selected a database with mysql_select_db(). now I have this code, but with the same result ? mysql_connect(localhost,root); mysql_select_db(finance); mysql_db_query(finace,INSERT INTO

[PHP-DB] zend debugger

2002-10-07 Thread xde7ori
Hy, I'm having problems with Zend development tool.. anyone can help me in order to run functions like oci* and ora* It not recognize these functions where sholud I have to make changes in order to run zend debugger...otherwise the php is running from the browser but in the debugger it does

Re: [PHP-DB] possible Error in Querydefiniton

2002-10-07 Thread Jason Wong
On Monday 07 October 2002 16:16, Ruprecht Helms wrote: Hi John W. Holmes, You can find out why with mysql_error(), but it's probably because you haven't selected a database with mysql_select_db(). now I have this code, but with the same result ? mysql_connect(localhost,root);

RE: [PHP-DB] possible Error in Querydefiniton

2002-10-07 Thread John W. Holmes
Use mysql_error() in your die() message to find out what the problem was... ---John Holmes... -Original Message- From: root@linux [mailto:root@linux] On Behalf Of Ruprecht Helms Sent: Monday, October 07, 2002 4:17 AM To: John W. Holmes Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB]

RE: [PHP-DB] possible Error in Querydefiniton

2002-10-07 Thread Ruprecht Helms
Hi John W. Holmes, Use mysql_error() in your die() message to find out what the problem was... ok, typemissmatch was the problem. Thank for the tip. Regards, Ruprecht Ruprecht Helms IT-Service und Softwareentwicklung Tel/Fax:

[PHP-DB] Array help needed :-(

2002-10-07 Thread Chris Payne
Hi there everyone, I have a problem i'm trying to figure out but i'm not too good with arrays, just know the basics, if anyone could help me out on this it would be wonderful :-) I have two sets of data in columns of a MySQL DB, these items are size and price. Size is seperate by comma's in

[PHP-DB] results of query

2002-10-07 Thread Edward Peloke
What does everyone typically use to display the results of a query. For example, I have a database that has a series of subjects and grades. If I select * from the table, I want a nice way for the data to be displayed. In cold fusion, I can simply use a grid that dynamically fills in. Can I

Re: [PHP-DB] results of query

2002-10-07 Thread Ignatius Reilly
It depends what you want to do with it. To display it in HTML, you can write them in a 2-D array: myarray[$i][$j], where $i is the row nb and $j the column nb, and write two nested loops. To export them to Access, CSV, ... you can issue your query through Access ODBC. You can then save as a

Re: [PHP-DB] results of query

2002-10-07 Thread Marco Tabini
Will this work (assume you're using mysql): function printresult ($rs) { if ($a = mysql_fetch_assoc($rs)) { // Print header echo 'tabletr'; foreach (array_keys ($a) as $v) echo 'th' . $v . '/th';

Re: [PHP-DB] results of query

2002-10-07 Thread 1LT John W. Holmes
What does everyone typically use to display the results of a query. For example, I have a database that has a series of subjects and grades. If I select * from the table, I want a nice way for the data to be displayed. In cold fusion, I can simply use a grid that dynamically fills in. Can

[PHP-DB] access DB via PHP classes

2002-10-07 Thread Ruth Zhai
Hi All, Although I am not so new to PHP (not expert either), this is the first time for me to use PHP class. I am starting a project, and plan to use partially OOP and partially traditional programming. I use PHP/MySQL. I have one class, DB_Do, which does every thing to do with database, and

[PHP-DB] Auto Increment

2002-10-07 Thread Gavin Nouwens
Hi peoples, Just wondering if it's possible with mysql to start an auto-increment field at a specified number instead of 0001? I could always just code it in php to add another number onto it to get it to the right start point, but leaves areas for human error to creep in! Any help would be

Re: [PHP-DB] access DB via PHP classes

2002-10-07 Thread Wilmar Perez
Well, I'll tell you what I do. I'm not a OOP expert so if someone feel like I'm doing it wrong I'll welcome any comment about . I've got a main class which I use to generate every page in my website (some are actually generated by inherited classes but that's the main idea). As I need a

[PHP-DB] Re: Auto Increment

2002-10-07 Thread Owen Prime
Gavin, You can specify the next auto_increment id by using SET INSERT_ID = #; Where # is your desired number. Will only work for the next INSERT/ALTER. Have a look down the bottom of 7.33 in the MySQL language reference. Cheers, Owen Gavin Nouwens wrote: Hi peoples, Just wondering if

Re: [PHP-DB] Auto Increment

2002-10-07 Thread Mark Nenadov
On October 8, 2002 01:49 am, Gavin Nouwens wrote: Hi peoples, Just wondering if it's possible with mysql to start an auto-increment field at a specified number instead of 0001? I could always just code it in php to add another number onto it to get it to the right start point, but leaves

[PHP-DB] Re: Auto Increment

2002-10-07 Thread Owen Prime
BTW... you only need to do it once. Subsequent INSERTS will follow on from the previous insert. Owen Prime wrote: Gavin, You can specify the next auto_increment id by using SET INSERT_ID = #; Where # is your desired number. Will only work for the next INSERT/ALTER. Have a look down

RE: [PHP-DB] Auto Increment

2002-10-07 Thread John W. Holmes
CREATE TABLE table_name (ID INT NOT NULL AUTO_INCREMENT = 1 PRIMARY KEY, ... ); ---John Holmes... -Original Message- From: Gavin Nouwens [mailto:[EMAIL PROTECTED]] Sent: Monday, October 07, 2002 9:50 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Auto Increment Hi peoples,

Re: [PHP-DB] access DB via PHP classes

2002-10-07 Thread Ruth Zhai
Thanks Wilmar, for sharing your experience with me. My problem now is that I have already got a class to do every thing related to database. If I don't use this DB class within other classes, I will have a lot of duplicated code. If I do use the DB class within other classes, I am not sure if

[PHP-DB] array intersect with 2 arrays created from mysql

2002-10-07 Thread Nigel Dunn
Hi, If anyone can help me with this I'd be most appreciative. I'm constructing 2 arrays of IDs from 2 different tables. Then I want to compare one to the other and only use the results that both arrays share in common to do a query loop that pulls the information for the related IDs to

[PHP-DB] Nevermind...I answered the question myself.

2002-10-07 Thread Nigel Dunn
Having a blonde moment the code to this post does work...there was no error handling in the code for the array_intersect() incase either of the arrays contained no data. My mistake. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: array intersect with 2 arrays created from mysql

2002-10-07 Thread Owen Prime
It may be because your not initialising your array. ie: $partner_type = array(); $partner_region = array(); PHP should automatically make it an array (if its not previously a different type) as soon as you do $partner_type[] but if you get no results from your query then it wont

[PHP-DB] Re: Array help needed :-(

2002-10-07 Thread David Robley
In article 000801c26e10$a2128510$f7fea8c0@chris, [EMAIL PROTECTED] says... Hi there everyone, I have a problem i'm trying to figure out but i'm not too good with arrays, just know the basics, if anyone could help me out on this it would be wonderful :-) I have two sets of data in columns