[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] For additional

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

[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,

[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:

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

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')

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] 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

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

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

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

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

[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 use

[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);

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 where

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 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 ? ?php $a = array(1,2,3,4,5); $b = array(a,b,c,d,e); $c = array(); $arraysize = sizeof($a); for ($i=0;$i$arraysize;$i++) { $c[$a[$i]] = $b[$i];

[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

[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:

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

[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

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; But It

[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