答复: [PHP-DB] Values in a date field

2007-03-17 Thread Jacob

$date=Getdate($subsciption_begins);
$month=$date[mon]
-邮件原件-
发件人: Ron Piggott [mailto:[EMAIL PROTECTED] 
发送时间: 2007年3月17日 21:45
收件人: PHP DB
主题: [PHP-DB] Values in a date field


I have a $subscription_begins variable.  It the date type.  -MM-DD

How may I find out the month value (1 to 12) of this variable?

Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



答复: [PHP-DB] Urgent! Installing PHP 4 on 6 4-bit machines

2007-03-08 Thread Jacob
Congratulations !!!

-邮件原件-
发件人: Ng Hwee Hwee [mailto:[EMAIL PROTECTED] 
发送时间: 2007年3月8日 16:23
收件人: php-db@lists.php.net
主题: Re: [PHP-DB] Urgent! Installing PHP 4 on 64-bit machines

Hi all,

Just to close this thread in case someone encounters the same problem as me.

The issue is solved by doing the following:
1) uninstall IIS
2) type the following in the command prompt to enable 32 bit extensions:
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET 
W3SVC/AppPools/Enable32bitAppOnWin64 1
3) reinstall IIS

So sorry, this isn't even a PHP problem. My apologise for posting to the 
wrong mailing list!

Thank you to all who helped! :o)

Best regards,
Hwee Hwee

- Original Message - 
From: Chris [EMAIL PROTECTED]
To: Ng Hwee Hwee [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Wednesday, March 07, 2007 10:13 AM
Subject: Re: [PHP-DB] Urgent! Installing PHP 4 on 64-bit machines


 Ng Hwee Hwee wrote:
 Hi Chris,

 Have you tried installing them? Are you getting an error? Nobody's going

 to be able to help without that information.

 They will run in 32bit mode, but they should work fine (32 bit binaries 
 work on a 64 bit processor, they don't work the other way around).

 The situation is such that my colleague is now in my customer's place in 
 another country and he is trying to do the installation but he called to 
 say he keeps failing... he didn't give me any information on the error 
 but ask me to check if there's any things he needs to look out for when 
 installing PHP 4.3.4 on a 64-bit Windows Server machine.

 I understand that it's not very easy to help me when I can't give you the

 exact error. I'm sorry because I myself can't get that information. His 
 native language is not English and thus he can't google effectively to 
 find the information he needs.

 I googled for this issue and found that maybe I can type the following in

 my command prompt to enable my 32 bit extensions:
 cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET 
 W3SVC/AppPools/Enable32bitAppOnWin64 1

 But, nope, that didn't solve the problem too.

 If there's anything that may help, please kindly share with me! Thank you

 so much in advance! :o)

 The -installs or -internals list would be able to help better I think.

 -- 
 Postgresql  php tutorials
 http://www.designmagick.com/

 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



答复: [PHP-DB] Urgent! Installing PHP 4 on 6 4-bit machines

2007-03-07 Thread Jacob
Check if phpmyadmin has the same problem.

-邮件原件-
发件人: Niel Archer [mailto:Niel Archer] 代表 Niel Archer
发送时间: 2007年3月7日 19:58
收件人: php-db@lists.php.net
主题: Re: [PHP-DB] Urgent! Installing PHP 4 on 64-bit machines

Hi

I've only had MySQL 4.1 running on 64 bit windows and PHP 5.x, without
any real problems when used locally.  However, there seemed to be a
problem using the MySQL server via TCP/IP, hence the upgrade to native
64 bit version (v5.0), which was not desired at the time but seemed to
be the only fix we could find.


Niel

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



答复: [PHP-DB] Urgent! Installing PHP 4 on 6 4-bit machines

2007-03-06 Thread Jacob
Hello all:
Maybe, you should ask  M$ ,in M$DN  to give help.

-邮件原件-
发件人: Chris [mailto:[EMAIL PROTECTED] 
发送时间: 2007年3月7日 9:30
收件人: Ng Hwee Hwee
抄送: php-db@lists.php.net
主题: Re: [PHP-DB] Urgent! Installing PHP 4 on 64-bit machines

Ng Hwee Hwee wrote:
 Hi Niel,
 
 The problem is my customer bought the hardware and the OS and we are 
 supposed to install PHP4 and MySQL4.0 on the IIS that came with their 
 Windows Server 2003...
 
 So I can't influence the decision on whether it should be a 32-bit or 
 64-bit machine. Given a choice, of course I won't use 64-bit!!! ;p
 
 Please kindly help and advice me!!! :o)

Have you tried installing them? Are you getting an error? Nobody's going 
to be able to help without that information.

They will run in 32bit mode, but they should work fine (32 bit binaries 
work on a 64 bit processor, they don't work the other way around).

-- 
Postgresql  php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



答复: 答复: [PHP-DB] Urgent! Installing PHP 4 on 64-bit machines

2007-03-06 Thread Jacob
Because we don't know ,but if it is a uncommon thing, M$ should give some
information about it , if not , we meet a new problem , we should ask M$ or
intel for help.   

-邮件原件-
发件人: Chris [mailto:[EMAIL PROTECTED] 
发送时间: 2007年3月7日 9:56
收件人: Jacob
抄送: 'Ng Hwee Hwee'; php-db@lists.php.net
主题: Re: 答复: [PHP-DB] Urgent! Installing PHP 4 on 64-bit machines

Jacob wrote:
 Hello all:
 Maybe, you should ask  M$ ,in M$DN  to give help.

Why? We don't even know if there is a problem, the OP was asking if it's
possible or not.

-- 
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Splitting Arrays in Half

2004-12-09 Thread Jacob Hackamack
Hello all,

I have the following code and here is my goal:

I have an array and right now, as the code stands, I have one column of data
on a page.  I want it to have 2 colums of data on a page.  I have tried this
and it just returns blank so I am asking for some help.  Thank you in
advance and I will be here for any questions you have.

Thanks Again,
Jacob



   $total_count = 0;
$display_count = 0;

//Do for each item
foreach ($item as $sched)
{
/*$total_count++;
$sched[] = array( 'teama' = $item[teama],
  'teamb' = $item[teamb],
 'scorea' = $item[scorea],
 'scoreb' = $item[scoreb]);
   
}
while ($total_count  $display_count)
{
if ($display_count != 0) next($sched);*/
//Start the Row
 $output-TableRowStart();

// Get the team name given its ID
$tma = pnModAPIFunc('Standings','user','getteam',array('tid' =
$sched[teama]));
$tmb = pnModAPIFunc('Standings','user','getteam',array('tid' =
$sched[teamb]));
$col1 = $vars['color1'];

// Home is the first team or the second?
$rev = $vars['reversed'];
if ($rev == 1) {
   $loc = $tmb[city];
   $field = $tmb[paddress];
} else {
   $loc = $tma[city];
   $field = $tma[paddress];
}

if ($sched[scorea] == -1)
{
$sched[scorea] = NA;
}
if ($sched[scoreb] == -1)
{
$sched[scoreb] = NA;
}
$output-Text(td);
$output-Text(table width='200');
$output-Text(tr);
$output-Text(td);
$output-Text(div align=\left\font
size=1nbsp;.$tma[team]. ($sched[scorea])/font/div);
$output-Text(/td);
$output-Text(td bgcolor='$col1' width='100');
$output-Text(font color=#FF
size='1'/font);
$output-Text(/td);
   $output-Text(/tr);
$output-Text(tr);
$output-Text(td);
$output-Text(div align=\left\font
size=1nbsp;.$tmb[team]. ($sched[scoreb])/font/div);
$output-Text(/td);
$output-Text(td bgcolor='$col1' width='100');
$output-Text(font color=#FF size='1'div
align=\right\a title='$field'$loc/a/div/font);
$output-Text(/td);
$output-Text(/table);
$output-Text(/td);

 /*   $display_count++;
next($sched);
   while($total_count  $display_count)
   {
   
// Get the team name given its ID
$tma = pnModAPIFunc('Standings','user','getteam',array('tid'
= $sched['teama']));
$tmb = pnModAPIFunc('Standings','user','getteam',array('tid'
= $sched['teamb']));

//Get the COlors
$col1 = $vars['color1'];

// Home is the first team or the second?
$rev = $vars['reversed'];
if ($rev == 1)
{
   $loc = $tmb[city];
   $field = $tmb[paddress];
}
else
{
   $loc = $tma[city];
   $field = $tma[paddress];
}

if ($sched[scorea] == -1)
{
$sched[scorea] = NA;
}
if ($sched[scoreb] == -1)
{
$sched[scoreb] = NA;
}
$output-Text(td);
$output-Text(table);
$output-TableRowStart();
$output-TableColStart(1,left);
$output-Text(font
size=1nbsp;.$tma[team]. ($sched[scorea])/font);
$output-TableColEnd();
$output-Text(td bgcolor='$col1'
align='center' valign='middle' width='80');
$output-Text(font color=#FF
size='1'/font);
$output-TableColEnd();
   $output-TableRowEnd();
$output-TableRowStart();
$output-TableColStart(1,left);
$output-Text(font
size=1nbsp;.$tmb[team]. ($sched[scoreb])/font);
$output-TableColEnd();
$output-Text(td bgcolor='$col1'
align='center' valign='middle' width='80');
$output-Text(font color=#FF
size='1'a title='$field'$loc/a/font);
$output-TableColEnd();
$output-Text(/table

[PHP-DB] Correction: [PHP-DB] Splitting Arrays in Half

2004-12-09 Thread Jacob Hackamack
I was thinking.  The way I have it now the code is commented out the parts
that I thought would work and allow me to have two columns.  I have
commented them out because in the production environment it was returning
nothing so I at least have to have it show SOMETHING!

Thanks in advance.  Hopefully it clairifies some things


On 12/9/04 1:28 PM, You, Jacob Hackamack, with the internet address:
[EMAIL PROTECTED] wrote:

 Hello all,
 
 I have the following code and here is my goal:
 
 I have an array and right now, as the code stands, I have one column of data
 on a page.  I want it to have 2 colums of data on a page.  I have tried this
 and it just returns blank so I am asking for some help.  Thank you in
 advance and I will be here for any questions you have.
 
 Thanks Again,
 Jacob
 
 
 
$total_count = 0;
 $display_count = 0;
 
 //Do for each item
 foreach ($item as $sched)
 {
 /*$total_count++;
 $sched[] = array( 'teama' = $item[teama],
   'teamb' = $item[teamb],
  'scorea' = $item[scorea],
  'scoreb' = $item[scoreb]);
  
 }
 while ($total_count  $display_count)
 {
 if ($display_count != 0) next($sched);*/
 //Start the Row
  $output-TableRowStart();
 
 // Get the team name given its ID
 $tma = pnModAPIFunc('Standings','user','getteam',array('tid' =
 $sched[teama]));
 $tmb = pnModAPIFunc('Standings','user','getteam',array('tid' =
 $sched[teamb]));
 $col1 = $vars['color1'];
 
 // Home is the first team or the second?
 $rev = $vars['reversed'];
 if ($rev == 1) {
$loc = $tmb[city];
$field = $tmb[paddress];
 } else {
$loc = $tma[city];
$field = $tma[paddress];
 }
 
 if ($sched[scorea] == -1)
 {
 $sched[scorea] = NA;
 }
 if ($sched[scoreb] == -1)
 {
 $sched[scoreb] = NA;
 }
 $output-Text(td);
 $output-Text(table width='200');
 $output-Text(tr);
 $output-Text(td);
 $output-Text(div align=\left\font
 size=1nbsp;.$tma[team]. ($sched[scorea])/font/div);
 $output-Text(/td);
 $output-Text(td bgcolor='$col1' width='100');
 $output-Text(font color=#FF
 size='1'/font);
 $output-Text(/td);
$output-Text(/tr);
 $output-Text(tr);
 $output-Text(td);
 $output-Text(div align=\left\font
 size=1nbsp;.$tmb[team]. ($sched[scoreb])/font/div);
 $output-Text(/td);
 $output-Text(td bgcolor='$col1' width='100');
 $output-Text(font color=#FF size='1'div
 align=\right\a title='$field'$loc/a/div/font);
 $output-Text(/td);
 $output-Text(/table);
 $output-Text(/td);
 
  /*   $display_count++;
 next($sched);
while($total_count  $display_count)
{

 // Get the team name given its ID
 $tma = pnModAPIFunc('Standings','user','getteam',array('tid'
 = $sched['teama']));
 $tmb = pnModAPIFunc('Standings','user','getteam',array('tid'
 = $sched['teamb']));
 
 //Get the COlors
 $col1 = $vars['color1'];
 
 // Home is the first team or the second?
 $rev = $vars['reversed'];
 if ($rev == 1)
 {
$loc = $tmb[city];
$field = $tmb[paddress];
 }
 else
 {
$loc = $tma[city];
$field = $tma[paddress];
 }
 
 if ($sched[scorea] == -1)
 {
 $sched[scorea] = NA;
 }
 if ($sched[scoreb] == -1)
 {
 $sched[scoreb] = NA;
 }
 $output-Text(td);
 $output-Text(table);
 $output-TableRowStart();
 $output-TableColStart(1,left);
 $output-Text(font
 size=1nbsp;.$tma[team]. ($sched[scorea])/font);
 $output-TableColEnd();
 $output-Text(td bgcolor='$col1'
 align='center' valign='middle' width='80');
 $output-Text(font color=#FF
 size='1'/font);
 $output-TableColEnd();
$output-TableRowEnd

[PHP-DB] Question

2004-11-08 Thread Jacob Hackamack
that you might provide or guidance would be greatly appreciated.  Thank you
in advance.

Jacob L. Hackamack


[PHP-DB] Session Values Change

2004-07-27 Thread Jacob Hackamack
Hello,  

I am trying to start a blog page where the person selects their person they
want to view (bottom of the page) and then it somehow changes the session
variable (top of the code) and then accesses the database.  I was wondering,
what is the correct way to do something like this.  I have tried a couple of
options (a hrefs) but they didn¹t seem to work and was wondering if anybody
had any suggestions.

Thank You In Advance

Jacob


?php
session_start();

if (! isset($_SESSION['view']))
{
   $_SESSION['view'] = Jacob;
}

?


 #FORMATTING CODE HERE
 $dbuser='php' ;
 $dbpass='';
 $dbhost='localhost';
   
 $conn = mysql_connect ( $dbhost , $dbuser , $dbpass );
 //mysql_select_db ( web );
 $sql = 'Select UNIX_TIMESTAMP(date) AS
date,title,article from web.blog where user='.$view.' order by date desc
LIMIT 10';
 $result = mysql_query($sql);
//Execute For Future Use: SELECT
DATE_FORMAT(date,'%W, %D %M, %Y %l:%i%p') content FROM blog
   
  while ( $dataRow = mysql_fetch_row ( $result ) ) {
   
 $date=date(F dS Y h:i:s A, $dataRow[0]);
   
  echo 'a name='.$date.'/a';
  echo '  div class=date'.$date. '/div';
  echo '  h3'.$dataRow[1].'/h3';
  echo '  p'.$dataRow[2].'/pbr';
  #echo $sql ;
  }
  mysql_close ( $conn );

#FORMATTING CODE HERE

   div id=footer
p
Other Users:
br
Jacob Hackamack | Julie Hackamack | David Hackamack/p
/div


[PHP-DB] Quick Question: Line Breaks

2004-01-08 Thread Jacob Hackamack
Hello,

I have a couple of quick questions.  When I execute this code on my php page
(I know that the .PSD image isn¹t web ready, but Safari does what I need it
to do :) ) it displays the entire source as one line.  Is there anyway to
have it be broken.  I have read places (internet sites) that say that the
following solutions might work:
echo Œ¹;\n\n
echo Œ¹\n\n ;
echo Œ\n\n¹;

None of them seem to work, am I doing something wrong?


echo 'meta http-equiv=content-type content=text/html; charset=utf-8';
echo 'html';
echo 'head';
echo 'title';
echo 'FilmCanister Desktops';
echo '/title';
echo '/head';
echo 'body';
echo 'center';
echo 'img src=images/Rotating.psd';
echo 'h2';
echo 'Coming SoonDesktop Pictures (2.83 GB Worth)/h2';
echo '/center';
echo '/body';
echo '/html';

Also, I am looking for a good freeware image gallery for Linux/Apache, if
anybody has any suggestions please help out.

Thanks for advance.

Jacob


RE: [PHP-DB] Re: send email

2003-11-27 Thread Jacob A. van Zanen
Hi 


This is PHP code and will be parsed by the webserver before being send
out to the browser.
All that is displayed in the browser is the non PHP stuff. So the email
address is in the source code of the php page but when you click 'view
source' in your browser you won't see it.


Jack



-Original Message-
From: howard gramer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 26, 2003 7:57 PM
To: Jack van Zanen Prive
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: send email


Sorry, I don't understand.  I thought the code that you posted was what
goes 
in the HTML page; meaning I thought it was php code.
Where does the source code sit?



howard grämer
  New York City
   [EMAIL PROTECTED]





From: Jack van Zanen [EMAIL PROTECTED]
To: howard gramer [EMAIL PROTECTED]
CC: Php-Db [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Re: send email
Date: Tue, 25 Nov 2003 23:24:43 +0100

Hi


my example earlier does not show the email address in  the source of 
the displayed web page. It is in the source code, but you can change 
that to be put in a config file
and include this file in the script.


Jack

-Original Message-
From: howard gramer [mailto:[EMAIL PROTECTED]
Sent: dinsdag 25 november 2003 21:09
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: send email


I am in the same boat,
( I posted a couple of days ago Subject: Re: [PHP-DB] Send formmail 
data to Email and Database ), not knowing where to put the Mail() into 
my own code. I am working on it but no success yet.

But, my real question in this topic; with formmail.pl using Sendmail 
your able to use recipients_alias = [EMAIL PROTECTED] inside of the

FormMail.conf file.  So this means you can hide the email address in 
the configuration file without it being seen in the page source.

How do you accomplish the same with Mail()? i.e. hiding the email


howard grämer
   New York City
[EMAIL PROTECTED]


 From: Kim Steinhaug [EMAIL PROTECTED]
 Reply-To: Kim Steinhaug [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Re: send email
 Date: Tue, 25 Nov 2003 19:57:44 +0100
 
 Well this shouldnt be any problem. I suspect you dont
 know how to set up the email routine since your asking.
 
 All you need to do is insert a sendmail script together with the 
 update of the mySQL database. You could use PHPs internal functions 
 for this, but Ill recommend you using PHPmailer which is heavily 
 documentet with tons of examples on how to use.
 
 The PHPmailer is located at sourceforge and you should find it right 
 away. It has to be the most elegant way I know of sending emails from

 PHP scripts.
 
 And as a bonus, the PHPmailer is under active development so you will

 most likely never run into problems using it, :)
 
 --
 Kim Steinhaug
 ---
 There are 10 types of people when it comes to binary numbers: those 
 who understand them, and those who don't.
 ---
 
 
 Redhat [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
   I have created a simple form that dumps input information into a 
   mysql database.  The person that I created it for said it would be

   nice if
it
   would also notify him by email that an entry was added to the
database.
   I have no idea where to begin with that - any ideas? thanks,
   DF

_
Set yourself up for fun at home!  Get tips on home entertainment
equipment, 
video game reviews, and more here.   
http://special.msn.com/home/homeent.armx

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] send email

2003-11-25 Thread Jacob A. van Zanen
Hi,


Here a bit of code that I use in a members list (this is the update bit)

CODE SNIPPET

if (isset ($_GET['update']) OR isset ($_POST['update']))
{
$db  = @mysql_connect(localhost, username,password);
mysql_select_db(walvis,$db);
if(isset($_POST['enter']))
{
$sql=update ledenlijst set
naam='$_POST[naam]',
voornaam='$_POST[voornaam]',
straat='$_POST[straat]',
postcode='$_POST[postcode]',
woonplaats='$_POST[woonplaats]',
telefoon='$_POST[telefoon]',
mobiel='$_POST[mobiel]',
email='$_POST[email]',
brevet='$_POST[brevet]'
where id = $_POST[id];
$result=mysql_query($sql);
print(meta http-equiv=\refresh\ content=\0;
URL=ledenlijst.php\);
$addr=$_SERVER[REMOTE_ADDR];
$agent=$_SERVER[HTTP_USER_AGENT];
$mailto=[EMAIL PROTECTED],$_POST[email];
$mailsubject=Your entry was updated on the Walvis
Ledenlijst;
$mailbody=Your entry was updated new info is:\n;
$mailbody.=Voornaam: $_POST[voornaam]\n;
$mailbody.=achternaam: $_POST[naam]\n;
$mailbody.=Straat: $_POST[straat]\n;
$mailbody.=Postcode: $_POST[postcode]\n;
$mailbody.=Woonplaats: $_POST[woonplaats]\n;
$mailbody.=telefoon: $_POST[telefoon]\n;
$mailbody.=mobiel:$_POST[mobiel]\n;
$mailbody.=e-mail: $_POST[email]\n;
$mailbody.=If this was done in error please send mail
to mailto:[EMAIL PROTECTED];
$mailbody.=Thanx!!\n;
$mailbody.=\n;
$mailbody.=\n;
$mailbody.=Changing IP address: $addr\n;
$mailbody.=Changing Browser: $agent\n;
print mail
($mailto,$mailsubject,$mailbody,FROM:[EMAIL PROTECTED]);
}
/CODE SNIPPET



Good Luck


Jack



-Original Message-
From: redhat [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 25, 2003 2:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] send email


I have created a simple form that dumps input information into a mysql
database.  The person that I created it for said it would be nice if it
would also notify him by email that an entry was added to the database. 
I have no idea where to begin with that - any ideas?
thanks,
DF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] using code for multiple sites

2003-11-13 Thread Jacob A. van Zanen
Hi


You could create an alias in every virtual host pointing to the same
directory for all sites, or I believe apache will use anything outside
the virtual host tags  as being default for all sites.

Jack


-Original Message-
From: mike [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2003 3:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] using code for multiple sites


I currently manage several websites that share the same code. This code
is included into many of the pages on every site. I have duplicate
copies of the code set up in each virtual host directory. Obviously this
wastes space on my server and wastes my time having to update them all.
 
I was looking for suggestions on the best way to be able to access these
php files through includes for each site. A couple of the options that I
have already looked into were- I could put the code all into one
directory for site A and when I want to include these files I would have
to include the full path to the files I really don't want to have to do
this because I frequently move things and I would have to change the
path on each file.
 
either put these files into .:/usr/local/lib/php
 
or 
create a directory called inc in /usr/local/apache 
and then add the following line to php.ini
include_path = .:/usr/local/apache/inc 
 
I hope I made it clear what I want to accomplish.
If you could give your recommendations I would greatly appreciate it. 
 
Thanks in advance,
 
 
 
 
Mike
 



Mike Calvelage

Webmaster / Sales Associate

Viper Systems

_.·´¯`·.¸¸-vipersystems.biz http://www.vipersystems.biz/ -¸¸.·´¯`·._

[EMAIL PROTECTED]

419-224-8344



 

 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] BBEdit

2003-11-06 Thread Jacob Hackamack
I use BBEdit on Mac OSX, I know I copied and pasted some things, but I
actually wrote all of the lines that you took out, weird.  I really have no
idea how its screwing up on spaces like that, I wish there was a PHP error
checker that actually told you what happens and why.  Anyways, the beta of
the site is up at 

http://www.filmcanister.com/Education/Physics/

If anybody wants to take a look at it (don't be afraid to put in a fake name
and period, the table is backed up and won't go live for some time) :).


Thank you one and all.

Jacob

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Problem Solved

2003-11-05 Thread Jacob Hackamack
Thanks for your help,  I was able to go through line by line and fix what
was wrong, I guess a simple rewriting of some code solved it because now its
better and faster then before.  Thank You all.

Jacob


RE: [PHP-DB] Selecting two names from a table

2003-10-06 Thread Jacob A. van Zanen
Hi,

Try something like this:

SELECT  U1.User_Name
,   U2.User_Name
,   B.Booking_Date 
FROMUSER U1
,   USER U2
,   BOOKING B 
WHERE   B.Booking_Creator = U1.User_ID 
AND B.Booked_User = U2.User_ID'

Jack



-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 11:24 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Selecting two names from a table


Hi,

I have a table called Bookings and a table called User. Bookings are
created and hold the User_ID of the User who created it
(Booking.Booked_User) and the User who will be going on the booking
(Booking.Booking_Creator). How can I create a report that lists both
users on each row. If I do 'SELECT U.User_Name, B.Booking_Date FROM
WMS_User WHERE B.Booking_Creator = U.User_ID AND B.Booked_User =
U.User_ID', then the query returns no data. So for each row in the table
I need to somehow select 2 names from the user table based on 2
different User_ID's held in the Bookings table. Any help would be
greatly appreciated.


Thanks for your help

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Need help with a OpenLink ODBC driver error again

2003-10-06 Thread Jacob A. van Zanen
Hi

Does the query return data when executed not through a browser but
directly on the database? 
If yes, how much time does it take to return the data. I believe default
time out for apache is 30 seconds. 
So maybe it's a webserver setting that needs to be increased.



Jack


-Original Message-
From: Don Myers [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 3:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Need help with a OpenLink ODBC driver error again 


Ok this time I checked the SQL select syntax! So I hope it's not
something that easy again (Well actually easy would be nice)

The other day I Posted a email question about getting a 37000 sql error
but my sql syntax was wrong. Yes I felt stupid but this time I corrected
the syntax and I am still getting an error but, the error is that the
web browser times-out trying to get the page. (Nothing displayed and a
browser error

Could not open the page ³http://127.0.0.1/tests/odbc.php² because
Safari could not load any data for this location.

I get the same type of thing with Internet Explorer.

Here is a recap.

I am using iodbc from openlink on OS X and everything seems fine. I can
get and display tables with:

$results = odbc_tables($conn) or die(P.odbc_errormsg());
odbc_result_all($results) or die(ppulling result error);

(full syntax below)

But when I switch to

$results = odbc_exec($conn,$sql) or die(p captured
.odbc_errormsg());
odbc_result_all($results) or die(ppulling result error);

I get an:
Could not open the page ³http://127.0.0.1/tests/odbc.php² because
Safari could not load any data for this location.

Any ideas? Why tables work but SQL Select doesn't?

Also I have a 5 user openlink license. how do I reset the connections
after I get 5 errors because I think the connections are not dropped
when PHP gets an error? The only way I can get to 5 lic. Limit to reset
is to restart os x? Sudo apachectl restart doesn't seem to work either?

Full Syntax:

? 
odbc_close_all();

putenv(DYLD_LIBRARY_PATH=/usr/lib/libiodbc.dylib);
putenv(ODBCINSTINI=/Library/ODBC/odbcinst.ini);
putenv(ODBCINI=/Library/ODBC/odbc.ini); //odbc.ini contains your DSNs.

$dsn=DSNname; // this is a valid DSN ’ can be tested in odbctest
$user=name; 
$password=password;
$sql=SELECT * FROM tblDepartments;

$conn=odbc_connect($dsn,$user,$password) or die (pcouldn't
connect);

echo connected to DSN: $dsn;
echo BRbSQL:/b $sqlBR;

//$results = odbc_exec($conn,$sql) or die(p captured
.odbc_errormsg()); $results = odbc_tables($conn) or
die(P.odbc_errormsg());

odbc_result_all($results) or die(ppulling result error);


echo closing connection $conn;
odbc_close($conn);
odbc_close_all();
?

Don Myers

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] UPDATE part of a column

2003-09-23 Thread Jacob A. van Zanen

As a separate issue, I would consider seperating the address field into
it's individual parts
Street,area,city etc.. All different fields





-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 23, 2003 2:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] UPDATE part of a column


Hi,

I have a column in my table called address. When users add an address
with a textarea they sometimes press return for a new line and this
seems to be putting line breaks into the database, so I have 2
questions:

1. How can I clean the table, so for example changing:
Ashfield Business CentreBR The Idlewells PrecinctBR
Sutton-in-AshfieldBR
to:
Ashfield Business Centre, The Idlewells Precinct,
Sutton-in-Ashfield,

2, Is there a way to make sure the data is 'clean' before entering into
the table?

Thanks for your help

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Databases and PHP?

2003-09-22 Thread Jacob A. van Zanen
PHP can be used with many different databases (MySql support is just
built in, others you have to compile in).
I do not know about DB2 but ODBC is always possible


Jack



-Original Message-
From: IN [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2003 11:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Databases and PHP?


Hello all,
With PHP, Is it possible to use DB2-UDB as a database (ADO) or any other
database, or must I use MySql. I am considering using PHP for building
web's and the kind of database to use might be an important factor.

TIA
I. Nemlich

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] MySQL: How to properly extract fields from retrieved single record ???

2003-09-22 Thread Jacob A. van Zanen
Hi,


I think this is what you are trying to do. You get a record back that
has seveal fields and you want to reference those fields indiviually.

This is what I do in this example (which shows people information) and
present in HTML table

EXAMPLE

$result = mysql_query(select * from ledenlijst order by naam,$db);
if ($myrow = mysql_fetch_row($result))
{
print(table border=\0\ \n);
print(trtd bgcolor=\#990066\a
href=all.php?insert=yesToevoegena/td\n);
print(td bgcolor=\#990066\bNaam/b/td\n);
print(td bgcolor=\#990066\bVoornaam/b/td\n);
print(td bgcolor=\#990066\bStraat/b/td\n);
print(td bgcolor=\#990066\bPostcode/b/td\n);
print(td bgcolor=\#990066\bWoonplaats/b/td\n);
print(td bgcolor=\#990066\bTelefoon/b/td\n);
print(td bgcolor=\#990066\bGsm/b/td\n);
print(td bgcolor=\#990066\bE-Mail/b/td\n);
print(td bgcolor=\#990066\bBrevet/b/td/tr\n);
do
{
print(trtd bgcolor=\#cc\);
print(a href=all.php?id=$myrow[0]update=yesupdate/a / a
href=all.php?id=$myrow[0]delete=yesdelete/a);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[1]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[2]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[3]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[4]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[5]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[6]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[9]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[7]);
print(\n);
print(/tdtd bgcolor=\#cc\);
print($myrow[8]);
print(\n);
print(/td/tr\n);
}
while ($myrow = mysql_fetch_row($result));
print(/table\n);
}
else
{
print(bSorry, no Records were found!/b);
}
EXAMPLE


-Original Message-
From: -{ Rene Brehmer }- [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2003 1:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL: How to properly extract fields from retrieved
single record ???


Hi gang

Still working on this DB for my gameclan not that it's essential
what 
it's for... and be warned: Never worked with any form of DB in PHP
before I 
began this project, so I'm a total n00b at these MySQL commands (and the

manual for MySQL is by far nowhere near as good as the PHP one).

Anyways, I'm retrieving a single record from the DB table, and then, 
because of the way the data needs to be displayed and manipulated, need
to 
extract every single field from that record as a seperate value.

I tried this:

 $num2edit = $_POST['edit'];
 $link = mysql_connect($host,$username,$password)
   or die('Could not connect : '.mysql_error());
 mysql_select_db($database) or die('Could not select database');

 $query = SELECT 
countryNum,country,nw,gov,strat,spy,troops,jets,turrets,tanks,ally,owner

FROM a2a WHERE countryNum=$num2edit;
 $result = mysql_query($query);

 $countryNum = mysql_result($result,1,'countryNum');
 $country = mysql_result($result,1,'country');
 $nw = mysql_result($result,1,'nw');
 $gov = mysql_result($result,1,'gov');
 $strat = mysql_result($result,1,'strat');
 $spy = mysql_result($result,1,'spy');
 $troops = mysql_result($result,1,'troops');
 $jets = mysql_result($result,1,'jets');
 $turrets = mysql_result($result,1,'turrets');
 $tanks = mysql_result($result,1,'tanks');
 $ally = mysql_result($result,1,'ally');
 $owner = mysql_result($result,1,'owner');

 /* Free resultset */
 mysql_free_result($result);
 /* Closing connection */
 mysql_close($link);

But all it gives me are errors like this:

Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 350
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 351
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 352
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 353
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 354
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 355
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 356
Warning: mysql_result(): supplied argument is not a valid MySQL result 
resource in E:\web\mpe\a2aedit.php on line 357
Warning: mysql_result(): 

RE: [PHP-DB] Email Form

2003-09-16 Thread Jacob A. van Zanen

Hi,


Combine the two scripts

Begin script
Accept the post variables
Insert them into the database
Mail them
End script


jack


-Original Message-
From: Philip O'Rourke [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 16, 2003 10:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Email Form


I am new to PHP and need some help with an form mail problem. Basically
i know how to get a form to submit data to MySQL and I know how email
the content of a form. But how do i get a form to do both?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Whios request record in database

2003-09-12 Thread Jacob A. van Zanen
In order to insert data into database you'll need an insert statement
I only see select * from $table


Jack



-Original Message-
From: IS [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 12, 2003 1:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Whios request record in database


I want to record the whois requests people do, not the whois output, in
a MySQL database. 

The following code I'm playing with, but it doesn't write anything to my
table. What's wrong?

?php
 if(!$name)
 {
  print(form name=\\ action=\$PHP_SELF\ method=\post\
  input type=\text\ name=\name\
  input type=\submit\ name=\name\
  /form);
  $db_name='dbname';
  $db_user='username';
  $db_password='password';
  $table='tablename';
  // Connect to the database
  $db_conn = mysql_connect(localhost,$db_user,$db_password);
  if (!$db_conn)
  {
   die (ERROR: Cannot connect to the database.);
   //exit();
  }
  $ip = $REMOTE_ADDR;
  $insert=select * from $table;
  $db_query=mysql_db_query($db_name,$insert);
  if($name)
  {
   if($dbquery)
   { print(Done.);
   }
   else
   { print(Didn't work.);
   }
  }
 }
?

--IS

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] include_path problem

2003-09-03 Thread Jacob A. van Zanen
I have not really followed this thread so if it is mentioned
already.

Is the include_path directive twice in the file?



-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 03, 2003 3:42 PM
To: 'Bruce Levick'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] include_path problem


On 03 September 2003 14:10, Bruce Levick contributed these pearls of
wisdom:

 There is an include_path for unix and an include_path for windows. 
 They both differ slightly but aren't of the same value that is being
 returned in the
 php info page or the error that I am receiving.
 
 This is the info displayed for my php.ini file. My OS is on G:.
 
 G:\WINDOWS\php.ini
 
 This is the Include_path directory shown in the phpinfo page. 
 .;c:\php4\pear
 
 Thanks very much for your help on this. Let me know if you need me to 
 post anything else that might help.

Well, I think I'm about out of ideas then -- so long as the ini file
you're editing is G:\WINDOWS\php.ini, this all looks spot on.

Just as a very last resort, can you post an extract from your
G:\WINDOWS\php.ini that shows the lines which set include_path, plus a
few lines either side -- just to check that there's nothing in their
context that might be mucking things up.

I suppose it might also be interesting to see the entire line from your
phpinfo that shows the include_path settings (i.e. both master and local
values).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS,
LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] another PHP Sql question...

2003-08-29 Thread Jacob A. van Zanen
One question:

Do you mean that a  b are from the same column but are row 1  2 from
your query result.?

If so, you can possibly write a loop like so

Dump all your records in an array;
Start loop for as long you find records in array
{
Take the first record from your array and dump it into a
variable (var1);
Move the value from the variable var1 to another variable
(var2);
If both variables are set
{
Print the two variables with the html tags you want;
Unset both variables;
}
}
Add a handler to make sure you get the last records if it happens to be
an od number off records;


You'll have to do your own coding around this logic.


Good luck


Jack


-Original Message-
From: jsWalter [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2003 9:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] another PHP Sql question...


 Boaz Yahav [EMAIL PROTECTED] wrote in message
 I'm not sure i understand the problem.
  a,c,e come from one query result and b,d,f from another?

No, they all come from the same table, but the same field name but from
different rows of the database.


 If it's all from the same query why not do :

 reult=mysql_query(.
 TABLE
 While($row = mysql_fetch_object($result)) {
 EchoTRTD$row-feild_A/TDTD$row-feild_B/TD/TR;
 }
 /TABLE

This method does not grap data from 2 rows at atime.

I examined my example and noticed I goofed, it should have read...

...

   tr
  tdrow_1/field_A/td
  tdrow_2/field_A/td
   /tr
   tr
  tdrow_3/field_A/td
  tdrow_4/field_A/td
   /tr

Same field, but diffeent rows.

Sorry for the confusion.

Walter

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] SELECT Part of a Field

2003-08-29 Thread Jacob A. van Zanen

Depending on the database you are using
Substring()
Substr()
Functions do what you want


jack



-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2003 11:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] SELECT Part of a Field


Hi,

How can I SELECT a portion of a field in a table for example the first
character, or the second two characters etc?

Thanks for your help

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Simple field replace...?

2003-08-28 Thread Jacob A. van Zanen
Try using the substring function in your sql statement

Substring('String',32);

Jack




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2003 11:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Simple field replace...?


Hi there,
I need to take a field in my database, and remove the first 32
characters 
from each entry...
There are 100's, and I know there's gotta be an easy way... I've looked
up string replace, and it only appears to work one at a 
time...
Can anyone tell me how to make it accross the whole table...?

*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Database backup

2003-08-27 Thread Jacob A. van Zanen
How'bout backing up your data directory (ies)

Otherwise you can maybe use mysql_dump in a batch??


Jack



-Original Message-
From: Chris Payne [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 26, 2003 11:46 PM
To: php
Subject: [PHP-DB] Database backup


Hi there everyone,

Is there a quick way I can backup all my databases on Linux so I can
download them to my HD/Burn them onto CD?

I've started a very large travel project and there is going to be over
100 DB's in the end, each with who knows how many tables and going
through PHPMyADMIN and exporting 1 DB at a time is going to take
forever.

My Server is the Rehat Linux 8.0 with Apache and MySQL and PHP.

Thanks, any help would be really appreciated (And save me alot of
headaches).

Chris

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] MYSQL 4.1 derived tables and PHP

2003-08-22 Thread Jacob A. van Zanen
Hi

THX

I added mysql_error()  to get the error message.

I got the message that the user did not have rights on table
/tmp/dbla.bla

I figured that I must give some more global read rights to this user
(not just DB read rights). After that it worked.


THX

Jack



-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 4:11 PM
To: Jack van Zanen Prive; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] MYSQL 4.1 derived tables and PHP


From: Jack van Zanen [EMAIL PROTECTED]
 I have installed MYSQL 4.1 with support for derived tables. If I query
Mysql
 with a query that has a subquery in the from clause it works fine. If 
 I
now
 load this query in PHP I get invalid resource error. If I change the
select
 for another select w/o the subquery it works fine (So my php script 
 must
be
 correct).

 Does PHP do syntax checking before sending the query to mysql? Any 
 other solution? I have tried PHP 4.3.2/4.3.3  5.0

What does mysql_error() say?

---John Holmes...


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] It\'s wierd when I\'ve used forms...

2003-08-22 Thread Jacob A. van Zanen
You'll have to look into stripslashes function (of the top of my head)

PHP automatically puts slashes around variables


Jack
On Fri, 2003-08-22 at 23:35, Joe Walker wrote:
 I've got a form (for sending mail to a user) and the user input is in an
 html form using the post method to pass:
 textarea name=message rows=10 cols=80 wrap=virtual
 along with some other vars to a php page which sends the message using:
 mail([EMAIL PROTECTED], $msgSubject, $message, From: $addyFrom);
  
 But if you type:
 What's it's problem?  I've got flippin' issues!
  
 In the message box, it comes in e-mail as:
 What\'s it\'s problem?  I\'ve got flippin\' issues!
  
 Escaping every apostrophe.  
  
 How do I have this not happen?   
  
 Thanks in advance.
 Joe


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] It\'s wierd when I\'ve used forms...

2003-08-22 Thread Jacob A. van Zanen
I mean in front of special characters off course :-)

Jack
On Fri, 2003-08-22 at 23:40, Jacob A. van Zanen wrote:
 You'll have to look into stripslashes function (of the top of my head)
 
 PHP automatically puts slashes around variables
 
 
 Jack
 On Fri, 2003-08-22 at 23:35, Joe Walker wrote:
  I've got a form (for sending mail to a user) and the user input is in an
  html form using the post method to pass:
  textarea name=message rows=10 cols=80 wrap=virtual
  along with some other vars to a php page which sends the message using:
  mail([EMAIL PROTECTED], $msgSubject, $message, From: $addyFrom);
   
  But if you type:
  What's it's problem?  I've got flippin' issues!
   
  In the message box, it comes in e-mail as:
  What\'s it\'s problem?  I\'ve got flippin\' issues!
   
  Escaping every apostrophe.  
   
  How do I have this not happen?   
   
  Thanks in advance.
  Joe
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PEAR DB

2003-07-28 Thread Jacob Marble
Hey all-
Before I ask my question, is there a more appropriate NG for PEAR::DB
related questions?  It always bugs to have off-topic posts...
Thanks,

Jake

LandEZ



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] PEAR DB getAssoc()

2003-07-10 Thread Jacob Marble
Hey all-
Could someone give an example of how to use the DB_Common::getAssoc()
function?  I'm trying to get an table into an array, and var_dump() shows
that the array is not associative.  Here's the code:

$sql = select * from sr_names;
$table = $db-getAssoc($sql);
echo var_dump($table);

And here's the output:

array(1) {
  [1]=
  array(16) {
[0]=
string(5) Jacob
[1]=
string(6) Marble
[2]=
NULL
etc...

As I understand it, an associative array should return something more
like:

array(1) {
  [1]=
  array(16) {
['firstname']=
string(5) Jacob
['lastname']=
string(6) Marble
['email']=
NULL
etc...

Or am I showing off my newness... ;-)  Any help greatly appreciated!!

Jake

LandEZ



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Problem with 4.3.2

2003-06-13 Thread Jacob Marble
Interesting.  They say the ISAPI module isn't production quality yet... we
use it, though, w/o problems.  We're running IIS on Win2000 and php 4.3.2.
Does it work besides the phpinfo() problem?

Jake

LandEZ

Ryan Jameson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
More info... I only get that message in ISAPI mode. :-\

 Ryan

-Original Message-
From: Ryan Jameson (USA)
Sent: Thursday, June 12, 2003 11:10 AM
To: [EMAIL PROTECTED]
Subject: Problem with 4.3.2


When I change over to 4.3.2 I get this message from phpinfo();

The operating system cannot run %1.

... any ideas? Thanks...

 Ryan

Ryan Jameson
Software Development Services Manager
International Bible Society



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Client API version is wrong or am I?

2002-11-20 Thread Jacob Larsen
I have installed the MySQL 4.0.4 client, but when I look at phpinfo() I see
that it says:
Client API version: 4.0.2-alpha

Why?

Regards, Jacob



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] previous and next links with php postgresql

2002-09-12 Thread Chandler, Jacob R

http://www.webmasterbase.com/article/662

-Original Message-
From: Angelo Marcos Rigo [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 12, 2002 11:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] previous and next links with php postgresql


Hi 
I am trying to have previous and next links in my php script wich i make a select from 
a table. I am using  postgresql anybody has a link for a tutorial or a sample code 
doing this?

Ângelo Marcos Rigo
Webmaster Colégio Anchieta
http://www.colegioanchieta.g12.br


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Time Question

2002-02-14 Thread Jacob Wyke

Use:

 date(n/j/Y  g:i:s A);

If you need any more help on what the letters mean, or you need to change
the layout visit:

http://www.php.net/manual/en/function.date.php

keTTle_drum.


Hi there. Got a bit of a snag. I'm migrating an ASP app to PHP with a
mssql7.0 backend. The snag is this, I have a 'starttime' field in my db
using the 'datetime' format ... looks like this 2/14/2002 12:21:28 PM.
Unfortuanely, I'm unable to convert this field to type integer at the
present time.

How would I get the current time in the same format as above (2/14/2002
12:21:28 PM) for insertion to the db in a datetime field datatype?

Thx Joe :)



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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Web Poll Using sql

2002-01-17 Thread Jacob Wyke

Hi,

I know this must sound like a really easy question, but im trying to create
a simple web poll, where you choose your answer from a radio button and then
click submit.

On submitting I would like to update a sql table depending on what box the
user clicked.

How can I make it so it increments a table row by one??

So say I click option D, I want Row D in my table Poll to be incremented by
one.

Hope you can help me.

Thanks in advance for any help I receive.


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




RE: [PHP-DB] Windows, MSSQL varchar255 caracters?

2001-11-12 Thread Jacob Anderson

The VARCHAR(255) bug is actually a limitation imposed by ODBC - so I
suspect the MSSQL library uses ODBC for communication with a SQLServer
installation.  I've experienced the same problem using Java JDBC and some
older SQL Server drivers.  Recent type-4 MS SQL Server drivers for JDBC have
fixed the problem, so no doubt subsequent ODBC implementations will contain
the fix, such as that found in Windows XP.

-- Jake
[EMAIL PROTECTED]

 -Original Message-
 From: Ryan Marrs [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 12, 2001 5:15 AM
 To: 'Michael Schmidt'; '[EMAIL PROTECTED]'
 Subject: RE: [PHP-DB] Windows, MSSQL varchar255 caracters?


 I fixed this issue by using a text field instead of a varchar field.  For
 some reason, it didn't want to read anything over 255 characters, although
 the data was still stored.  Maybe it's a bug, or maybe just a limitation.

 Ryan


 -Original Message-
 From: Michael Schmidt [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 12, 2001 8:12 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Windows, MSSQL varchar255 caracters?

 Hi All.

 With the Microsoft SQL Server it is possible to make a table with
 fields of
 the type varchar which can have more then 255 characters width.

 When use a query to get the content, i only get the first 255
 characters all
 others are cut off. (i connect to the DB via the mssql_... commands).

 Anyone has a idea how to solve the problem?

 Michael



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




[PHP-DB] Abstraction layers

2001-10-24 Thread Jacob Singh

What is everyone's favorite abstraction layer?
--
Jacob Singh, [EMAIL PROTECTED] on 10/24/2001




--
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[2]: [PHP-DB] Selecting twice from the same table

2001-09-13 Thread Jacob Singh

Hello Justin,

Thursday, September 13, 2001, 11:07:26 AM, you wrote:

JB On Thu, 13 Sep 2001, Jacob Singh wrote:

 Hello,
   main
   --
   ID autonumber
   content_ID enum('artist','song','album',user function','genre', etc.)
   name char
   img char
   des char
   etc. etc.

   songs
   ---
   main_ID ( link to main table) int
   artist_ID (link to parent) int
   length (length of song) char
   size (size of file) char
   file (file location) char
   etc.
   etc.

   Now my goal is to take a given number of songs say 10 songs of
   various artists and get a list like:

   artist 1
  song1  - length - size
  song2  - length - size
  song3  - length - size
   artist 2
  song1  - length - size
  song2  - length - size
  song3  - length - size

JB I -think- I'm seeing your database design... but I'm not sure if your
JB parent id (artist_id) links back to the songs table or the main table.. at
JB any rate, a simple GROUP BY on your query would let you query out songs by
JB criteria and then sort them by artist.

JB BTW, you may wish to take a look at any similar projects at
JB www.freshmeat.net for examples, unless you've already done that and found
JB that no other projects come close to your needs.

JB Justin Buist



The parent id links back to the main table.  I'm sorry, I didn't
eleborate enough.  There is one more table to note, the downloads
table.  This table just matches member id's to song id's to see whos
bought what.
downloads

member_ID (from user table, unimportant)
song_ID (links to both the main table and songs table)

so if my data looked like:
member_ID  | song_ID
1  |1
1  |2
1  |5
2  |1
3  |5
3  |4
3  |1

I'd want to query something like:
SELECT song_ID,songs.*,main.* from downloads,songs,main WHERE
downloads.member_ID = X X being an int AND songs.main_ID = main.ID
and songs.artist_ID = main.ID (obvious problem here)
The issue is that I need to get the name field and others from the
main table for each song and simultaneously get those same fields from
that same table from the artist_ID field in the same recordset, get
it?  I'm thinking that there is no way to do this with sub-selects, is
it possible to do with PHP someway?
thanx,
J


-- 
Best regards,
 Jacobmailto:[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] Backups, best practices

2001-09-06 Thread Jacob Singh

Hello,

  I'm just wondering how everyone manages their MySQL backups, I'm
  looking for a better solution than manual.  any scripts or example
  would be especially appreciated. tnks

-- 
Best regards,
 Jacob Singh
 Pajama Design 
 (413)582-9342
 2 Belanger Pl.
 Northampton, MA 01060

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