[PHP-DB] attach file

2001-09-27 Thread Sommai Fongnamthip

Hi,
How I retrieve data from DB and make it to mail attachment?  I've been 
read PHP function about mailto but It did not contain any suggestion.

SF


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] mysql_fetch_array() doesn't work

2001-09-27 Thread Jason G.


echo a href='$PHP_SELF?offset=$i*$step' target='_top'

Missing end quote and semicolon on this line may be the reason...

Try properly indenting and formatting your code.  Also take advantage of 
going in and out of php mode to seperate your code from your display of 
content...
Ex:
instead of this:
? echo(td align=\center\ width=\$nWidth\$sContent/td); ?
Try this:
td align=center width=? echo($nWidth); ?? echo($sContent); ?/td
Or even this:
td align=center width=?=$nWidth??=$sContent?/td

It makes it MUCH easier to read and maintain, and seperates the PHP code 
from the HTML content as much as possible.

Any questions, please ask me.

-Jason Garber
Lead Programmer - www.pulseaday.com
[EMAIL PROTECTED]

At 12:48 PM 9/27/2001 +0800, you wrote:
System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98

When PHP is running at the line: $arr=mysql_fetch_array($res);
The IE always show info as below:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]

What's the problem wiht mysql_fetch_array() or other?
What does the T_STRING' or `T_VARIABLE' or `T_NUM_STRING' mean?

THANKS
Mike


The full code below:


?
$link=mysql_connect(localhost,,);
if($link==false){
echo Failed linking to database.;
exit();
}
$handler=mysql_select_db(database1);
if($handler==false)
echo Failed linking to database.;
$query=selct count(*) from users where sign=1;
$res=mysql_query($query);
$row=mysql_fetch_row($res);
$all=$row[0];
$step=5;
$pages=ceil($all/$step);   /*the number of pages needed to listed */
if(empty($offset))
$offset=0;
$query=select user_id, user_name, time, status, comment from users
where sign=1
order by user_name
limit $offset, $step;
$res=mysql_query($query);
echo tabletd align=centerUser/td
td align=centerAdded time/tdtd align=centerStatus/td/tr;
$num=mysql_num_rows($res);
for($i=0; $i$num; $i++) {
$arr=mysql_fetch_array($res);   /* HERE is line where the error occurs!!!
*/
echo trtd align=centera href=\profile.php?id=$arr['user_id']\
target='_top'
$arr['user_name']/a/td;
echo td align=center$arr['time']/td;
echo td align=center$arr['status']/td/tr;
echo tr colspan=3td$arr['comment']/td/tr;
}

echo /tablebrbrbr;

echo tabletrtd align='center';  /* show others in multi-pages */
for($i=0; $i$pages; $i++){
echo a href='$PHP_SELF?offset=$i*$step' target='_top'
echo ($i+1)./a;
echo nbsp;nbsp;;
}
echo /td/tr/table;

?


-
create table users (
user_id int not null auto_increment primary key,
user_name varchar(30),
time datetime,
status tinyint(1),
comment text,
sign tinyint(1) default '1'
);







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP-DB] create data array

2001-09-27 Thread Sommai Fongnamthip

Hi,
If I need to use data array like this
$data_array = array (
array(text,1,2,3),
array(text,4,5,6),
array(text,7,8,9)
);
all array element are contain in my database.  How could I write PHP code 
to make this command on the fly?

SF


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Can't connect Mysql using php

2001-09-27 Thread Jae

I already use ./configure--with-mysql.

Is it need to install again?
thx
Lars B. Jensen [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 you need to install your PHP using
 ./configure --with-mysql
 rather than
 ./configure --without-mysql

 / LJ
 -Original Message-
 From: Jae [mailto:[EMAIL PROTECTED]]
 Sent: 27. september 2001 13:05
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Can't connect Mysql using php


 './configure' '--prefix=/usr' '--with-config-file-path=/etc'
 '--disable-debug' '--enable-pic' '--enable-shared'
 '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs'
 '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext'
 '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2'
 '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes'
 '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem'
 '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp'
 '--enable-wddx' '--without-mysql' '--without-oracle' '--without-oci8'
 '--with-xml'

 thx

 Jason Wong [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó
 000a01c14674$87e58080$[EMAIL PROTECTED]">news:000a01c14674$87e58080$[EMAIL PROTECTED]...
  -Original Message-
  From: Jae [mailto:[EMAIL PROTECTED]]
  Sent: 26 September 2001 17:41
  To: [EMAIL PROTECTED]
  Subject: [PHP-DB] Can't connect Mysql using php
  
  
  
  ±H¥óªÌ: Jae [EMAIL PROTECTED]
  ¦¬¥óªÌ: [EMAIL PROTECTED]
  ¥D¦®: Re: Error on connecting  to mysql database
  ¤é´Á: 2001¦~9¤ë26¤é ¤U¤È 05:09
  
  After recompile, the error still occurs.
  pls help
  
  Jae [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I got this message when i call the php script,
  
   Fatal error: Call to undefined function: mysql_connect() in
   /home/jaelee/public_html/test01.php on line 6
  
   what's wrong?
   thx
 
  Run ? phpinfo(); ? and tell us the output of the 3rd row of the first
  table, ie the Configure Command.
 
  --
  Jason Wong
  Gremlins Associates
  www.gremlins.com.hk
  Tel: +852-2573-5033
  Fax: +852-2573-5851
 



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] mail() - is there a limit?

2001-09-27 Thread Luke Muszkiewicz

olinux:

I do not know the answer to your question.

However, I would alternatively suggest that you send the email to each
person individually. That is to say, loop through your recipient array and
use mail() to send the message to each recipient, as opposed to creating a
bcc array and then sending one email.

This solution will take longer to execute -- you may in fact need to adjust
the maximum program execution time via set_time_limit() -- but each
recipient will receive an individual email, which, I think, will make your
message look more personal.

Plus, you no longer need to consider the number of addresses in the bcc
field.

Let me know if you have any questions!

-luke

Luke Muszkiewicz
Pure Development, LLC
http://puredev.com


 I am using a script that grabs about 100 emails from a
 database, loops thru and writes them to $bcc

 Then I use a single mail() to send a msg to everyone
 in the $bcc

 Is there a maximum nuber of emails that i can mail to
 this way?

 Thanks,
 olinux


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] PHP and ms Access

2001-09-27 Thread olinux


www.phpbuilder.com has a few decent articles on this that will help you.

olinux

-Original Message-
From: François PERROT [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 31, 2001 10:19 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP and ms Access


Hi,

You need to retreive data using a query script and just put them in a page
:)
It's as easy as that...
Anyway if you precise your question  we'll be able to give a more precise
answer



-Message d'origine-
De : user [EMAIL PROTECTED]
À : [EMAIL PROTECTED] [EMAIL PROTECTED]
Date : vendredi 31 août 2001 15:33
Objet : [PHP-DB] PHP and ms Access


Hello,

I am builing a microsoft access database.

Now wants the compagny I created it for me to use it to make dynamic
webpages. The problem is that I am new at this.

Can somebody please explain the basics of integrating a MS Access databse
with php into a webpage?

I thank you in advance,

TheB'Oss

//Could you please mail the answer to [EMAIL PROTECTED]

Thx



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] howto craete a stored procedure in DB2?

2001-09-27 Thread Thies C. Arntzen


hi,

i'm working on OUT paramter support in the ODBC module when
calling stored procedures. to start playing with it i need to
create a stored procedure in DB2 (this is the db my customer
is using). me -the stupid oracle guy- does not know how to
load a stored procedure into DB2. 

could anybody give me a tiny example how to load such a beast
into DB2?

re,
tc



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MSSQL and BLOBs

2001-09-27 Thread gus

Hi!

Does anybody get it working to extract/insert BLOBs from/into a MSSQL (7 or
2000) database with PHP4?
What is the best way to do it? COM objects and ADO, mssql functions or ODBC
functions?

I tried it with the ODBC functions. It works but there's the 1MB limit and I
need to access BLOBs with a size 1MB.
I tried it with ADO (GetChunk) but failed with an Unsupported variant type.

Any help greatly appreciated.

  Guido

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] php and Oracle database

2001-09-27 Thread GEORGINA ELAINE BAILEY

I am very new to PHP and databases and have not really had very much
programming practice. However, I am trying to create a Web page that
retrieves data from an Oracle database and uses php to display the content
in a HTML format. For some reason though my script just doesn't seem to
work, despite the fact that I know there is data in teh database that
matches the criteria, and only prints the final three HTML links at the
bottom of the script.

Any ideas? But please make them easy enough for a 3 year old to understand.

Georgina Bailey


html
head
titleProject Database - Project Search/title
/head

body bgcolor=#9966FF link=lime vlink=yellow
div align=centerimg src=compSciPageBanner.gif//div

h1 align=centerProject Search/h1

form action=http://users.aber.ac.uk/geb97/search1.php4; method=POST

h2 align=centerPlease select the relevant module and then check the area(s) that 
may interest you/h2
h4 align=center If, for example, you would like to see all projects that involve 
Java,
check the Java box. If you would like only those that involve both Java and databases, 
check both boxes.
You must check at least one box/h4

p
input type=radio name=moduleID value=CS39030 
checked=checkedbigCS39030/bigbr/
input type=radio name=moduleID value=CS39110bigCS39110/bigbr/
input type=radio name=moduleID value=CS49060bigCS49060/bigbr/
input type=radio name=moduleID value=CSM9060bigCSM9060/bigbr/
input type=radio name=moduleID value=CSM9260bigCSM9260/bigbr/
/p

p
input type=radio name=keyword value=java checked=checkedbigJava/bigbr/
input type=radio name=keyword value=telematicsbigTelematics/bigbr/
input type=radio name=keyword value=artificialIntelligencebigArtificial 
Intelligence/bigbr/
input type=radio name=keyword value=databasesbigDatabases/bigbr/
input type=radio name=keyword value=68HC11big68HC11 Assembly 
Language/bigbr/
input type=radio name=keyword value=webbigWeb Development/bigbr/
input type=radio name=keyword value=othersbigOther Programming 
Languages/bigbr/
/p

p
div align=centerinput type=submit value=Submit/

input type=reset value=Reset//div
/p

/form

div align=center
pre
a href = http://www.aber.ac.uk;Return to UWA Home Page/a

/pre/div


div align=center
pre
a href = http://www.aber.ac.uk/compsci;Return to Computer Science Home Page/a

/pre/div

div align=center
pre
a href = mainMenu.htmlReturn to Project Database Main Menu/a
/pre/div


/body
/html



html
head
titleProject Database - Search Results/title
/head

body bgcolor=#9966FF link=lime vlink=yellow
div align=centerimg src=compSciPageBanner.gif//div



?php


if ($submit == Submit)
{
// The submit button was clicked!
// Get the input and use it to retrieve information from the database.

//make a connection to the database
PutEnv(ORACLE_HOME=/usr/local/applic/oracle/816);
$connection = OCILogon(geb97,f8s0g99,trdb);

//if a connection to the database is not made output a message
if (!$connection)
{
echo I couldn't make a connection!;
exit;
}

//formulate the query
$query = SELECT PROJECT.originator, PROJECT.title, PROJECT.projectID, 
PROJECT.status, PROJECT.specialSkills, PROJECT.moduleID from PROJECT, PROJKEY, 
KEYWORD, MODULE WHERE PROJECT.projectID=PROJKEY.projectID AND 
KEYWORD.keyID=PROJKEY.keyID AND PROJECT.moduleID='CS39030' AND KEYWORD.keyword='java';


//parse the statement
$qry_statement = OCIParse ($connection, $query); //or die (Couldn't parse 
statement);


//execute the query statement
OCIExecute($qry_statement);  //or die (Couldn't execute query);


//echo table align=\center\ border=\1\ cellpadding=\8\ 
cellspacing=\2\ bgcolor=\silver\;
//echo  tr valign=\center\thORIGINATOR/ththTITLE/ththPROJECT 
NUMBER/ththAVAILABILITY/ththSPECIAL //SKILLS/th/tr


//retrieve the results of the query statement and present them in the 
following way
while (ocifetch($qry_statement))
{
echo The Originator is: .OCIresult($qry_statement, 'ORIGINATOR');

echo The title is: .OCIresult($qry_statement, 'TITLE');

echo The projectID is: . OCIresult($qry_statement, 'PROJECTID');

echo The availabilty is: . OCIresult($qry_statement, 'AVAILABILITY');

echo The special skills are: . OCIresult($qry_statement, 
'SPECIALSKILLS');


//echo tr align =\center\td .OCIresult($qry_statement, 
'ORIGINATOR'). /td/tr;

//echo tr align=\center\td .OCIresult($qry_statement, 
'TITLE'). /td/tr;

//echo tr align=\center\td .OCIresult($qry_statement, 
'PROJECTID'). /td/tr;

//echo tr align=\center\td .OCIresult($qry_statement, 
'AVAILABILITY'). /td/tr;

//echo tr align=\center\td .OCIresult($qry_statement, 
'SPECIALSKILLS'). /td/tr;
}


//log off the database
OCILogoff ($connection);

}


?


div 

Re: [PHP-DB] php and Oracle database

2001-09-27 Thread Anthony Carlos

Georgina:

Based on your 2 enclosures, it appears that you have an html file called
search1.html. When the user hits the submit button, it calls search1.php4.
My question, therefore, is do you have output from search1.php4? Do you see
any error messages?

Thanks,

Anthony Carlos

 From: GEORGINA ELAINE BAILEY [EMAIL PROTECTED]
 Date: Thu, 27 Sep 2001 12:20:17 +0100
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] php and Oracle database
 
 I am very new to PHP and databases and have not really had very much
 programming practice. However, I am trying to create a Web page that
 retrieves data from an Oracle database and uses php to display the content
 in a HTML format. For some reason though my script just doesn't seem to
 work, despite the fact that I know there is data in teh database that
 matches the criteria, and only prints the final three HTML links at the
 bottom of the script.
 
 Any ideas? But please make them easy enough for a 3 year old to understand.
 
 Georgina Bailey
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] mysql_fetch_array() doesn't work

2001-09-27 Thread Rick Emery

change coding to (note, each line is enclosed in quotes and ends withn .):

$query=select user_id, user_name, time, status, comment from users.
where sign=1.
order by user_name.
limit $offset, $step;
print $query;  //sanity check...contents of $query
$res=mysql_query($query) or die(mysql_error());   //note the die() clause

-Original Message-
From: Web user [mailto:[EMAIL PROTECTED]]
Sent: 27 September 2001 05:48
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql_fetch_array() doesn't work


System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98

When PHP is running at the line: $arr=mysql_fetch_array($res);
The IE always show info as below:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]

What's the problem wiht mysql_fetch_array() or other?
What does the T_STRING' or `T_VARIABLE' or `T_NUM_STRING' mean?

THANKS
Mike


The full code below:


-

?
$link=mysql_connect(localhost,,);
if($link==false){
echo Failed linking to database.;
exit();
}
$handler=mysql_select_db(database1);
if($handler==false)
echo Failed linking to database.;
$query=selct count(*) from users where sign=1;
$res=mysql_query($query);
$row=mysql_fetch_row($res);
$all=$row[0];
$step=5;
$pages=ceil($all/$step);   /*the number of pages needed to listed */
if(empty($offset))
$offset=0;
$query=select user_id, user_name, time, status, comment from users
where sign=1
order by user_name
limit $offset, $step;
$res=mysql_query($query);
echo tabletd align=centerUser/td
td align=centerAdded time/tdtd align=centerStatus/td/tr;
$num=mysql_num_rows($res);
for($i=0; $i$num; $i++) {
$arr=mysql_fetch_array($res);   /* HERE is line where the error
occurs!!!
*/
echo trtd align=centera href=\profile.php?id=$arr['user_id']\
target='_top'
$arr['user_name']/a/td;
echo td align=center$arr['time']/td;
echo td align=center$arr['status']/td/tr;
echo tr colspan=3td$arr['comment']/td/tr;
}

echo /tablebrbrbr;

echo tabletrtd align='center';  /* show others in multi-pages */
for($i=0; $i$pages; $i++){
echo a href='$PHP_SELF?offset=$i*$step' target='_top'
echo ($i+1)./a;
echo nbsp;nbsp;;
}
echo /td/tr/table;

?



-
create table users (
user_id int not null auto_increment primary key,
user_name varchar(30),
time datetime,
status tinyint(1),
comment text,
sign tinyint(1) default '1'
);






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] create data array

2001-09-27 Thread Rick Emery

the following assumes you've opened database.

$query = SELECT TextVal,Val1,Val2,Val3 FROM mytable WHERE some_condition;
$result = mysql_query($query) or die(mysql_error());
$mycmd = \$data_array = array (;
while( $row = mysql_fetch_array($result) )
{
$mycmd .=
array(\.$row['TextVal'].\,.$row['Val1'].,.$row['Val2'].,.$row['Val
3'].),;
}
$mycmd = substr($mycmd,0,-1).);;
print $mycmd;\\ sanity check...display $mycmd
eval($mycmd);\\ execute the command. $data_array is created
mysql_free_result($result);

-Original Message-
From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 2:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] create data array


Hi,
If I need to use data array like this
$data_array = array (
array(text,1,2,3),
array(text,4,5,6),
array(text,7,8,9)
);
all array element are contain in my database.  How could I write PHP
code 
to make this command on the fly?

SF


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: delete multiple entries from a database using PHP

2001-09-27 Thread David Tod Sigafoos

A little more info would be helpful ..

Is this one table or multiple tables .. what are the columns and
relationships .. 

DTSig
David Tod Sigafoos

On Wed, 26 Sep 2001 21:36:39 +0545, [EMAIL PROTECTED] wrote:

how can I delete multiple entries from a database using PHP . I need to make
a webbased admin tool for a program I'm doing which must have insert, edit,
update and delete facilities I have done all the others except the delete
part. i can do it one by one but its time consuming so I was looking for a
better way.. Help anyone


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Hellllp DBF

2001-09-27 Thread Marcelo Ramos Souza

I need HELP, I can´t open a DBF, I using this:

$dbf = dbase_open('/public/dados/clientes.dbf',0);
$drec = dbase_get_record_with_names($dbf,1);
// ITEM must be in all caps, otherwise
// you get nothing
echo $drec['ITEM'];
But result this error:

Fatal error: Call to undefined function: dbase_open() in

Please, help me



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Hellllp DBF

2001-09-27 Thread Rick Emery

sounds like database manipulation was not compiled into PHP when it was
installed on your server.

-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Hep DBF


I need HELP, I can´t open a DBF, I using this:

$dbf = dbase_open('/public/dados/clientes.dbf',0);
$drec = dbase_get_record_with_names($dbf,1);
// ITEM must be in all caps, otherwise
// you get nothing
echo $drec['ITEM'];
But result this error:

Fatal error: Call to undefined function: dbase_open() in

Please, help me



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: how do I update fields in a mysql database with php?

2001-09-27 Thread David Tod Sigafoos

Try something like this ...

$sql_query = SELECT newscat_id,newscategory,newscat_status FROM
dvd.news_categories WHERE newscat_id='$newsid' 

 $res = mysql_query( $sql_query) or 
DIE (MySQL gave error:  . mysql_errno() . brMySQL Error
String:  . mysql_error()
  . brQuery:  . $sql_query);

This should give you a good idea what the error is ..

When ever you are creating new scripts with db queries it is a handy
idea to see what the server is putting our during error conditions.

DTSig
David Tod Sigafoos

On Wed, 26 Sep 2001 18:09:36 +0200, [EMAIL PROTECTED] (Tommy
Nilsson) wrote:

I got a bit of a problem:
$result1 = mysql_query (SELECT
newscat_id,newscategory,newscat_status FROM dvd.news_categories WHERE
newscat_id='$newsid')
 
shouldn't that work?
Or what is wrong with it?
Im running apache/mysql om windows XP.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] attach file

2001-09-27 Thread Rick Emery

Follow this link which describes how to create attachments for email:
http://www.phpbuilder.com/columns/kartic2807.php3

Use these techniques after retrieving the data from the database to be
formed into an attachment

-Original Message-
From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 1:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] attach file


Hi,
How I retrieve data from DB and make it to mail attachment?  I've
been 
read PHP function about mailto but It did not contain any suggestion.

SF


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Hellllp DBF

2001-09-27 Thread Marcelo Ramos Souza

Who I do  ?
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Marcelo Ramos Souza' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:27 AM
Subject: RE: [PHP-DB] Hep DBF


sounds like database manipulation was not compiled into PHP when it was
installed on your server.

-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Hep DBF


I need HELP, I can´t open a DBF, I using this:

$dbf = dbase_open('/public/dados/clientes.dbf',0);
$drec = dbase_get_record_with_names($dbf,1);
// ITEM must be in all caps, otherwise
// you get nothing
echo $drec['ITEM'];
But result this error:

Fatal error: Call to undefined function: dbase_open() in

Please, help me



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Hellllp DBF

2001-09-27 Thread Rick Emery

You need to talk to the server's owner to ask that PHP be installed with the
database capabilities you need.

Does your company own the server; if so, speak to the admin.  If you are
using web-hosting, talk to them.
-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:39 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Hep DBF


Who I do  ?
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Marcelo Ramos Souza' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:27 AM
Subject: RE: [PHP-DB] Hep DBF


sounds like database manipulation was not compiled into PHP when it was
installed on your server.

-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Hep DBF


I need HELP, I can´t open a DBF, I using this:

$dbf = dbase_open('/public/dados/clientes.dbf',0);
$drec = dbase_get_record_with_names($dbf,1);
// ITEM must be in all caps, otherwise
// you get nothing
echo $drec['ITEM'];
But result this error:

Fatal error: Call to undefined function: dbase_open() in

Please, help me



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] (poss OT) mail() function

2001-09-27 Thread Dave Watkinson

hi all

We have a web based employment site, running on PHP and MySQL (to all
those didn't know!). Whenever a candidate sees a job they're interested
in they click a button and an email is sent to our consultants for them
to act on.

The problem, little as it is, is that I've written a function to send
the email (copied below) and sometimes (more often than not) the email
is fine (I get a copy), but other times it's all plain text and the
formatting isn't there.

Does anyone know why this would happen?

Cheers in advance


Dave



//  start copy of function

function send_email($whoto,$whofrom,$subject,$message) {
$subject = [AUTOMATED NOTIFICATION] - $subject;
$mailheaders = Content-Type: text/html;
charset=iso-8859-1; // Mime type
mail($whoto, $subject, $message, $mailheaders);
 }

//  end copy of function

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Hellllp DBF

2001-09-27 Thread Marcelo Ramos Souza

Using PHP 4 installed and the phpdbase.dll disable.
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Marcelo Ramos Souza' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:41 AM
Subject: RE: [PHP-DB] Hep DBF


You need to talk to the server's owner to ask that PHP be installed with the
database capabilities you need.

Does your company own the server; if so, speak to the admin.  If you are
using web-hosting, talk to them.
-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:39 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Hep DBF


Who I do  ?
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Marcelo Ramos Souza' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:27 AM
Subject: RE: [PHP-DB] Hep DBF


sounds like database manipulation was not compiled into PHP when it was
installed on your server.

-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Hep DBF


I need HELP, I can´t open a DBF, I using this:

$dbf = dbase_open('/public/dados/clientes.dbf',0);
$drec = dbase_get_record_with_names($dbf,1);
// ITEM must be in all caps, otherwise
// you get nothing
echo $drec['ITEM'];
But result this error:

Fatal error: Call to undefined function: dbase_open() in

Please, help me



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Hellllp DBF

2001-09-27 Thread Rick Emery

if phpdbase.dll is disabled, then you can't use dbase_open()

-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:55 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Hep DBF


Using PHP 4 installed and the phpdbase.dll disable.
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Marcelo Ramos Souza' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:41 AM
Subject: RE: [PHP-DB] Hep DBF


You need to talk to the server's owner to ask that PHP be installed with the
database capabilities you need.

Does your company own the server; if so, speak to the admin.  If you are
using web-hosting, talk to them.
-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:39 AM
To: Rick Emery; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Hep DBF


Who I do  ?
- Original Message -
From: Rick Emery [EMAIL PROTECTED]
To: 'Marcelo Ramos Souza' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:27 AM
Subject: RE: [PHP-DB] Hep DBF


sounds like database manipulation was not compiled into PHP when it was
installed on your server.

-Original Message-
From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 8:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Hep DBF


I need HELP, I can´t open a DBF, I using this:

$dbf = dbase_open('/public/dados/clientes.dbf',0);
$drec = dbase_get_record_with_names($dbf,1);
// ITEM must be in all caps, otherwise
// you get nothing
echo $drec['ITEM'];
But result this error:

Fatal error: Call to undefined function: dbase_open() in

Please, help me



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]