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]
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
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
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
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
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
;;
; 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
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
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
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
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
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
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 |
+-
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
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
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'
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
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
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
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')";
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
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
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
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
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
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
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
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
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
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
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
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;
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
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
34 matches
Mail list logo