[PHP-DB] how to make multiple in a coloum in mysql DB

2002-03-05 Thread Yoga Anak Medan
salam, i'm make a database in mysql, example : namescore Ascore ATotal john 7890 mike 9070 etc... ask me is: how to make multiple or total in coulum "Total" otomatically, if me input score in coulom total. please help me... (i a

[PHP-DB] MySQL_connect

2002-03-05 Thread Mikael_Jensen
Hi, I'm new to MySql, when I try to connect my PHP-script with mysql_connect($host, $user, $pass) my script returns the error "Fatal error: Call to undefined function: mysql_connect()" I have given the user all rights in MySQL, both on host, DB, tables, and fields This might be easy for you

[PHP-DB] Re: Dynamic Drop Down Box

2002-03-05 Thread Ralph Friedman
In article , Randy Rankin wrote: > Based on the user selection, the 2nd > drop down box would be populated with the distinct 'make' for that model > (ie; if the user selects Ford in the first drop down, the 2nd drop down > would be populated with Expl

[PHP-DB] MSSQL2000

2002-03-05 Thread Mike
Anybody able to get this working under a Windows2000 advanced server, IIS, PHP 4.1.1, MSSQL2000 SP2 all on one box I am beginning to believe it is not possible using any php_mssql.dll that i have ever found. correct me if anybody can. -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Ken Thompson
On Tuesday 05 March 2002 05:11 pm, Andy wrote: > So what is the proper function in PHP to convert the MySQL timestamp into a > proper format like Sonday, Apr. 20th 2002? > Thanx, > > Andy > > > "Jason Wong" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED]... > > > On Wednesd

[PHP-DB] Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread DL Neil
Andy, > So what is the proper function in PHP to convert the MySQL timestamp into a > proper format like Sonday, Apr. 20th 2002? SELECT from SQL using UNIX_TIMESTAMP() Format for presentation in PHP using: string date ( string format [, int timestamp]) Regards, =dn > > > I am playing around

[PHP-DB] Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Andy
So what is the proper function in PHP to convert the MySQL timestamp into a proper format like Sonday, Apr. 20th 2002? Thanx, Andy "Jason Wong" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED].; > On Wednesday 06 March 2002 04:31, Andy wrote: > > Hi there, > > > > I am playin

[PHP-DB] 2 mysql connections to same server?

2002-03-05 Thread Tom
Hi, does anyone know how to make multiple database connections to the same server without getting the same Resource-ID back from the "mysql_connect" ? I´m trying to write an abstract database class. I want to be able to have different instances for every connection. For example one connection fo

Re: [PHP-DB] HELP Using PHP with Apache (IAS Oracle)

2002-03-05 Thread Wayne Bastow
Berli, Oracle's Apache is compiled with Oracle's libraries. The php modules you have are probably not compiled with the same libraries. On Linux (in the documentation) there is a procedure to compile Oracle's version of Apache to include other modules. The other option you have is to run a se

[PHP-DB] ODBC limit

2002-03-05 Thread Michael Dolan
I know you can do an SQL LIMIT 0, 30 on MySQL. Is there any way to do this kind of limit (i.e. select only the first 30 rows) on an Access database? I want to lower the overhead of having to select all the database rows only to show the first 30. Any help is appreciated. Thanks, Mike _

[PHP-DB] Re: [PHP] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Jason Wong
On Wednesday 06 March 2002 04:31, Andy wrote: > Hi there, > > I am playing around with the timestamp functions. I created a timestamp > with mysql ( the row is timestamp) > and do reformat this thing after selecting with php in the folowíng way: > > $date_posted[$i] = strftime("%A, %d-%m-%Y %R",

RE: [PHP-DB] Dynamic Drop Down Box

2002-03-05 Thread Leotta, Natalie (NCI/IMS)
This can be done with JavaScript - I don't know if you can do it in PHP. I had a site where I wanted to let people compare data for two states so based on the first state that was chosen I populated the compare with the other states. If you want me to send you my code I can. It uses another fil

[PHP-DB] timestamp iin MySQL not compatible to the one in PHP???

2002-03-05 Thread Andy
Hi there, I am playing around with the timestamp functions. I created a timestamp with mysql ( the row is timestamp) and do reformat this thing after selecting with php in the folowíng way: $date_posted[$i] = strftime("%A, %d-%m-%Y %R", $date_posted[$i]); This always returns Tuesday, 19-01-203

[PHP-DB] Dynamic Drop Down Box

2002-03-05 Thread Rankin, Randy
Does anyone know how I might populate a drop down box based on the users selection from a previous drop down box? For example, if I have a table called 'autos' with 2 fields, 'make' and 'model'. I select distinct 'make' and populate the first drop down box. Based on the user selection, the 2nd dro

Re: [PHP-DB] Time Question

2002-03-05 Thread DL Neil
Joe, > Hi there, I have a field in my db called expires and it holds a value for > the last time somebody visited my site such as 1015354119 . > > How would I add 15 minutes onto this? Would I use the mktime() and do it > that way, or there a better way to do this? Use a SQL function (quicker,

RE: [PHP-DB] Time Question

2002-03-05 Thread Shrock, Court
15 minutes = 15 * 60 seconds. Therefore just add 900 to the field. > -Original Message- > From: Lerp [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 05, 2002 11:15 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Time Question > > > Hi there, I have a field in my db called expires and

[PHP-DB] Time Question

2002-03-05 Thread Lerp
Hi there, I have a field in my db called expires and it holds a value for the last time somebody visited my site such as 1015354119 . How would I add 15 minutes onto this? Would I use the mktime() and do it that way, or there a better way to do this? Thx Joe :) -- PHP Database Mailing List (

[PHP-DB] Selecting BYTE via ODBC

2002-03-05 Thread Ling
Hi there. I have a problem with selecting and displaying binary data( images) DB Engine - Postgress ODBC - unixODBC PHP - 4.1.2 I connect to postgres via ODBC. Have problems with displaying data of type BYTEA ( images ) here code of script selecting and displaying images: = script name print_im

[PHP-DB] Accessing Mainframe

2002-03-05 Thread Sridhar Moparthy
Hi All, Is it possible to access IBM Mainframe from PHP on Windows? Is so, do I need to install any software on Mainframe? Are there any "classes" available to do this? I am using PHP 4.X on Windows. Thank you in advance, Sridhar Moparthy

[PHP-DB] PHP 4.1.2 and gdbm

2002-03-05 Thread Leo
Hello, all! I have one problem i can't bild php --with-gdbm support. I have it on my Linux: gdbm-1.8.0-10 and during install there are no errors, but when i try use function in my program (dbmopen(), dblist().) PHP write that it is undefined function. Thanks! -- ó Õ×ÁÖÅÎÉÅÍ, Leo

Re: [PHP-DB] Re: multiple select statements

2002-03-05 Thread Andrés Felipe Hernández
check out this code: * function build_statement ( $col, $needle ) { $sWhere = ""; if ( $needle!= "" ) { $array = explode ( " ", $needle ); $sWhere = "( "; $firsttime= True; foreach ( $array as $str ) { if ( !$firsttime) $sWhere.= "or

Re: [PHP-DB] any php/Linux gurus out there?

2002-03-05 Thread Jim Lucas [php]
I being a person that is working with both RH 7.0 & 7.1 would not recommend forcing an upgrade. I did that when I attempted to upgrade to 7.2 and wanted to try a few new things that didn't come with the install. I ended up having to reinstall the entire OS. So, make the effort and upgrade all t

RE: [PHP-DB] Re: multiple select statements

2002-03-05 Thread Leotta, Natalie (NCI/IMS)
I'd try building it piece by piece if you do have too many combinations - (I'm not promising efficiency, but I do something similar to this in one of my programs and it works). Have vars for each type of data: $firstName = ""; $lastName = ""; etc. Then you can set each one based on the selectio

Re: [PHP-DB] security

2002-03-05 Thread Paul Burney
on 3/4/02 11:34 PM, jas at [EMAIL PROTECTED] appended the following bits to my mbox: > how can you find out what the php.ini is looking like? is there a way to > use php to get that info. i have used phpinfo() but i cannot see whether or > not file_uploads is disabled It will only show up in P

RE: [PHP-DB] security

2002-03-05 Thread Shrock, Court
Look for "file_uploads" in the "PHP Core" section of output from phpinfo(). A "1" means that it is enabled. A "0" means that it is disabled. Also, to address: > > i personally think that the developer still has > > the control in making his php code secure. but how do you > > think will this new

[PHP-DB] Re: multiple select statements

2002-03-05 Thread Lerp
Hi there :) You could construct seperate queries for every possible combination of search provided you don't have a huge number of search criteria (form elements for your search) . I did this just recently for a friend finder site. In the search the user has four fields that are automatically inc

RE: [PHP-DB] multiple select statements

2002-03-05 Thread Shrock, Court
Try creating your input with names that php will create arrays from, then you can simply join the array elements if they are non-empty with something like " OR $key='$val'". An example: When submitted you could then: $clause = ''; if (sizeof($_POST['filter']) > 0) { $clau

Re: [PHP-DB] security

2002-03-05 Thread jas
how can you find out what the php.ini is looking like? is there a way to use php to get that info. i have used phpinfo() but i cannot see whether or not file_uploads is disabled Jas "Paul Burney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; on 3/3/02 7:39 PM, Ric Mañalac at [EMA

[PHP-DB] multiple select statements

2002-03-05 Thread Geoffrey Makstutis
Hi, I've got an HTML form which allows users to select various criteria to search for in my database (MySQL). The problem is that I can't seem to figure out how create the SELECT statement, given the fact that they could choose any or none of the criteria. Does anyone know of a way to dynam

RE: [PHP-DB] Re: FW: PHP Question on MySQL grouping

2002-03-05 Thread Shrock, Court
How about changing: if ($a_row[dishtype] != $loop) to // the $loop variable must be unset before the loop starts // though, so put a unset($loop) right before your while if ($a_row[dishtype] != $loop && isset($loop)) Court > -Original Message- > From: Keiran Wynyard [mailto:[EMAIL P

Re: [PHP-DB] addslashes needed for db security? Hack proving webapps

2002-03-05 Thread Paul Burney
on 3/5/02 5:35 AM, Andy at [EMAIL PROTECTED] appended the following bits to my mbox: > No I was reading in a mysql book, that chars like ' are bad for db > PHP provides the function addslashes. Is this the way to check for bad > entries a user provides? What happens > if a hacker tryes to delete

[PHP-DB] Re: FW: PHP Question on MySQL grouping

2002-03-05 Thread Keiran Wynyard
Thanks to both Aron and Mr Crouch for their help... Aron suggested three separate queries, which was a thought I had originally, but as I was about to implement that idea, with the extra code that required Mr Crouch came along with his 'test' variable idea. The code I used is at the end of this p

[PHP-DB] HELP Using PHP with Apache (IAS Oracle)

2002-03-05 Thread Berlina
Hi to all, Im trying to use Apache Web Server from IAS (Oracle) with PHP 4.1.1. in a Windows NT server. When I try to load the php modules, apache shows an error that said that I need to recompile Apache with the flag -EAPI. Somody know to do this? There ara another way to use these librarie

[PHP-DB] addslashes needed for db security? Hack proving web apps

2002-03-05 Thread Andy
Hi there, I am wondering how to make my application more secure. No I was reading in a mysql book, that chars like ' are bad for db PHP provides the function addslashes. Is this the way to check for bad entries a user provides? What happens if a hacker tryes to delete my db entries with a input