[PHP-DB] Merge two arrays into associative arrays?

2001-05-21 Thread Shahmat Dahlan
Is there anywhere possible for me to merge two arrays into associative arrays? e.g. $a=array(1,2,3,4,5); $b=array("a","b","c","d","e") into $c=array(1 => "a", 2 => "b", etc... ) Thanks in advance.. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP-DB] image upload -> mime types??

2001-05-21 Thread Jens Nedal
Hy, First of all i would not allow upload of any graphical files without extensions, like it is allowed on a Mac. The reason for this is that graphical fiels without a certain extension like *.gif *.jpg *.png will mostly not be recognized by any browser as some graphic. A suggestion would be onl

[PHP-DB] CHECK POST

2001-05-21 Thread Shashwat
I AM TESTING THIS NG BY THIS MESSAGE BECAUSE MY EARLIER MESSAGE WHICH I POSTED FROM GOOGLE IS NOT STILL HERE.. if you see this please reply SHASHWAT -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

[PHP-DB] INSERT statement

2001-05-21 Thread Bartek Pawlik
Hi, I have problem with INSERT statement in PostgresSQL v.7.0.3. In one script I insert values in column1,column3,column5. Later I want to fill column2 and column4. I use INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE (column1 = $z) Php shows: Warning: PostgreSQL query failed: ERRO

RE: [PHP-DB] INSERT statement

2001-05-21 Thread Beau Lebens
try INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z' quote marks around the $z and make sure you are doing it as query( "INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z'" ); or whatever, using " marks properly :) HTH Beau // -Original M

Re: [PHP-DB] INSERT statement

2001-05-21 Thread Russ Michell
I don't use PostgresSQL, but the SQL can't be that different: INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE column1 = '$z' //Loose the brackets after the WHERE clause, and add single quotes //around your variable. Russ INSERT INTO table (column2,column4) VALUES ('$x','$y') WHE

Re: [PHP-DB] connection to Oracle 7.3 with ora_logon()

2001-05-21 Thread Philippe Saladin
;; ; Dynamic Extensions ; ;; ;Windows Extensions extension=php_oci8.dll extension=php_oracle.dll ""Sheeta"" <[EMAIL PROTECTED]> a écrit dans le message news: 9dfq8g$no0$[EMAIL PROTECTED] > Dear, > > Sorry, I also have the same probelm... On my php.ini, I

RE: [PHP-DB] INSERT statement

2001-05-21 Thread Craig Vincent
I have problem with INSERT statement in PostgresSQL v.7.0.3. In one script I insert values in column1,column3,column5. Later I want to fill column2 and column4. I use INSERT INTO table (column2,column4) VALUES ('$x','$y') WHERE (column1 = $z) Php shows: INSERT can't contain a WHERE clause as I

Re: [PHP-DB] INSERT statement

2001-05-21 Thread Miles Thompson
Bartek, Saw all the other replies, and they are correct, but what you want now is an UPDATE, not an INSERT. You have the record, you are amending it. Miles At 10:54 AM 5/21/01 +0200, Bartek Pawlik wrote: >Hi, >I have problem with INSERT statement in PostgresSQL v.7.0.3. >In one script I insert

[PHP-DB] Warning: SQL error: , SQL state in SQLConnect in test.php on line 5

2001-05-21 Thread Chris Lee
Dear All, Language: PHP v4.05 OS:RedHat Linux 7.1 WebServer: Apache 1.3.20 w/mod_php DB2: db2connect-7.1 DB Server: IBM AS/400 DB2 Connect to db2/as400 under the console of DB2 Connect works! However, connect to db2/as400 via PHP fail sometime with the following error, what's the

[PHP-DB] PHP 4.04 pl1 + Winnt SP6a and SQLServer2000

2001-05-21 Thread Ravi Motha
I currently have the specified set- up and having problems connecting to our instance of the database on the MS SQL Server 2000, I was wondering if anyone out there has a similar set-up knows if there are any specific steps I need to take to make the server work. I can currently make a connecti

Re: [PHP-DB] connecting to database..?

2001-05-21 Thread rice
Thank you very much for your help!!! It works now!!! There are two methods to fix the error mentioned by Derick. 1. Supply the socket path to mysql_connect() furnction. e.g. $link = mysql_connect("localhost:3306:/var/lib/mysql/mysql.sock", "user", "password"); where 3306 is default port and "/va

[PHP-DB] Data errors in entering

2001-05-21 Thread Shane Barry
I seem to be having a problem with a php script I use to enter data into a sql database from a php frontend. The data are ints (months and years as a number). The Database is : +--+-+--+-+-+---+ | Field| Type| Null | Key | Default | Extra | +-

Re: [PHP-DB] image upload -> mime types??

2001-05-21 Thread bill
Hi Matthew, I ignore both the mime-type and the extension, and assume mistakes (sooner or later) by the user. Running getimagesize() on the file will show what image type it is by actually looking at the file. If it isn't one of those types, I delete it. If it is a correct type, I force the c

Re: [PHP-DB] Data errors in entering

2001-05-21 Thread Miles Thompson
You're going to hate this ... add the $ so that you have $month, $year. Miles PS I've done it too - you red it so many times you no longer see anything. At 03:10 PM 5/21/01 +0100, Shane Barry wrote: >I seem to be having a problem with a php script I use to enter data into a >sql database from a p

Re: [PHP-DB] Data errors in entering

2001-05-21 Thread biorn
The problem is in your insert statement. You forgot the $ on your month and year variable values. Your statement should read: $sql = "INSERT INTO $table_name (day,daydate,month,year,time,place,numbers, details,reportby) VALUES ('$day',$daydate,$month,$year,'$time','$place','$numbers','$details'

[PHP-DB] question about

2001-05-21 Thread Michael Cheung
Hi; I use the following lines to get a result from database; But It give me result 0, it is incorrect; $sql="Select count(*) From member where email=:email"; $sth=OCIParse($dbh,$sql); OCIBindByName($sth,"email",$email,64); OCIExecute($sth); OCIFetchInto($sth,$data); but when I directly u

[PHP-DB] question about OCIBindByName(add some comment)

2001-05-21 Thread Michael Cheung
Hi; Linux 2.2.18 + oracle 8.1.7i + php-4.0.5 + oci8 interface. I use the following lines to get a result from database; But It give me result 0, it is incorrect; $sql="Select count(*) From member where email=:email"; $sth=OCIParse($dbh,$sql); OCIBindByName($sth,"email",$e

Re: [PHP-DB] question about OCIBindByName(add some comment)

2001-05-21 Thread Thies C. Arntzen
On Mon, May 21, 2001 at 11:35:36PM +0900, Michael Cheung wrote: > Hi; > Linux 2.2.18 + oracle 8.1.7i + php-4.0.5 + oci8 interface. > > I use the following lines to get a result from database; > But It give me result 0, it is incorrect; > > $sql="Select count(*) From member wher

RE: [PHP-DB] Data errors in entering

2001-05-21 Thread Rubanowicz, Lisa
I am only a beginner but I always use single quotes, I am using mySQL. Such as: $sql = "INSERT INTO $table_name (day, daydate, month, year, time, place, numbers, details, reportby) VALUES ('$day', '$daydate', 'month', 'year', '$time', '$place','$numbers','$details', '$reportby')";

RE: [PHP-DB] Merge two arrays into associative arrays?

2001-05-21 Thread Jonathan Hilgeman
try: $a=array(1,2,3,4,5); $b=array("a","b","c","d","e"); $c = array(); foreach($a as $a_key => $a_value) { $c[$a_value] = $b[$a_key]; } that should give you what you want. Jonathan -Original Message- From: Shahmat Dahlan [mailto:[EMAIL PROTECTED]] Sent: Monday, May 21, 2001 12:23 AM T

[PHP-DB] RE: [PHP-INST] Instalation Problems /w Win98 + Apache 1.3.19

2001-05-21 Thread Jonathan Hilgeman
Try using the FoxServe package at www.fox-hunt.net - they seem to be temporarily down, but you can just get the package from SourceForge. The package installs PHP 4.0.5/mySQL 3.23.36/Apache 1.3.19 perfectly on any Windows system. No hassles about configuration or anything like that. The package is

[PHP-DB] RE: [PHP-INST] PHP4 Works but Sessions Don't!!

2001-05-21 Thread Jonathan Hilgeman
1) Do you get any errors back (check your error log if you can)? 2) Maybe your host/machine does not have the correct permissions set on their /tmp directory to allow you to write the session file. 3) Probably a stupid idea, but just in case, do you have cookies enabled on your browser? -Orig

Re: [PHP-DB] Merge two arrays into associative arrays?

2001-05-21 Thread Lars B. Jensen, LJ Webnologics
Have followed this group for a while, it is my turn to try send an response. Would this angle with a for loop not be better than a foreach angle ? / Lars www.ljweb.com - Original Message - From: "Jonathan Hilgeman" <[EMAIL PROTECTED]> To: "'Shahmat Dahlan'" <[EMAIL PROTECTED]> Cc: "PHP

[PHP-DB] Locking tables of MySQL

2001-05-21 Thread Gladis
I found that the PHP scripts for locking tables of MySQL do not work properly. Could anyone tell me how to achieve the locking mechanism? Thanks a lot! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

[PHP-DB] expiration

2001-05-21 Thread Pankaj Ahuja
Hi all I have a page on which I have a menu. When I click on any one of the options and come back, the page expires instantaneously. What could be the reason ? I am using sessions Thanks in advance Pankaj Ahuja -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [E

RE: [PHP-DB] image upload -> mime types??

2001-05-21 Thread Gary Pullis
Don't trust file extensions. Use getimagesize() to examine the file. $imginfo = getimagesize($uploadfile); switch ($imginfo[2]) { case 1: // gif case 2: // jpg case 3: // png case 4: // swf default: // not an image } > -Original Message- > From: Jens Nedal [mailto:[EMAIL PROTE

[PHP-DB] newbie: why doesn't this work?

2001-05-21 Thread twopeak
this works, but it doesn't like to retrieve the data, the intention of this is that it just returns all the links... but it loves to return errors... === voornaam , $row->achternaam "; } ?> === -- PHP D

[PHP-DB] Anchor tags for search results

2001-05-21 Thread Brian Tegtmeier
What's up? I am running into a slight problem with a search funtion and I was wondering if any of you PHP gurus can help me out. My current situation is where I have a Search script via this DGS Search at http://www.hotscripts.com/Detailed/5477.html and when I do a search for a specific item, it

[PHP-DB] pulling images from a database

2001-05-21 Thread Trent Reimer
I'm trying to find an efficient way to pull images from a database. What I'm saying is that the actual image file itself is being stored as a Binary Large OBject in the database (MySQL) and that I want to use it on a web document. The only way I've been able to do it so far is to call an external

Re: [PHP-DB] newbie: why doesn't this work?

2001-05-21 Thread Trent Reimer
just at a quick glance I see a couple things I would try changing at the end of your "for" loop you have a closing brace but I don't see an opening brace anywhere, that should throw things. Also in the conditions of your "for" loop you have "++$count" which I haven't really seen before. Would the

Re[2]: [PHP-DB] question about OCIBindByName(add some comment)

2001-05-21 Thread Michael Cheung
On Mon, 21 May 2001 16:39:05 +0200 "Thies C. Arntzen" <[EMAIL PROTECTED]> wrote: > On Mon, May 21, 2001 at 11:35:36PM +0900, Michael Cheung wrote: > > Hi; > > Linux 2.2.18 + oracle 8.1.7i + php-4.0.5 + oci8 interface. > > > > I use the following lines to get a result from database;

[PHP-DB] [PHP-DB]: Error Configuring PHP w/ FreeTDS

2001-05-21 Thread Lester June Cabrera
Hi, I wanted to configure PHP w/ Sybase support in our Solaris box. So, I have installed FreeTDS. When I ran the "configure" command in PHP, I got the following error messages: checking whether the C++ compiler (c++ -R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2

Re: [PHP-DB] Merge two arrays into associative arrays?

2001-05-21 Thread Shahmat Dahlan
This should have worked but my data are not single characters as I had showed earlier. Maybe the examples below are clearer. $a=array("id","svrname","ipadd","domainname",); $b=array("ID","Server Name","IP Address","Domain Name"); Thanks "Lars B. Jensen, LJ Webnologics" wrote: > Have followed