RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into MySql

2001-10-29 Thread Ricky Theil

If your first field is an auto insert field, then you have to do it like
this:

insert into tablename (column2,column3,column4,column5) values
(value2,value3,value4,value5)

The auto incremented field will be automatically be filled in with the next
available value.

Ricky

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 29, 2001 9:24 AM
To: Robby Whiteside; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] HELP PLEASE!! Get query error when inserting into
MySql


If any of the values you are trying to insert are not integers, you need to 
put single quotes around the variables, ie. $SCRIPT_NAME, $date, $BName, etc

in the insert statement.


Robby Whiteside [EMAIL PROTECTED] said:

 Hi There,
 
 I have a query whenever I try to insert something into a mysql table. 
 This
is 
 the code I am using:
 ?
 
 $host1 = gethostbyaddr($REMOTE_ADDR);
 $date = date(Y-m-d h:i:s);
 $link = mysql_connect($host, $user, $passwd); 
 mysql_select_db($database, $link); $sql = INSERT INTO vcstats 
 VALUES('', $SCRIPT_NAME, $date,
$HTTP_USER_AGENT, 
 $BName, $BVersion, $BPlatform, $REMOTE_ADDR, $host1); $result = 
 mysql_query($sql) or die(query errorBr . mysql_error()); 
 mysql_close();
 
 ?
 
 Thanks,
 Robby
 
 -
 This message was sent using Endymion MailMan. 
 http://www.endymion.com/products/mailman/
 
 
 
 --
 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] HELP PLEASE!! Get query error when inserting into My Sql

2001-10-29 Thread Ricky Theil

I was never able to assign a null value to get a row to automatically insert
into SQL server 7.  It would always give me an error that said something
like you cannot assign the value NULL to an identity field.

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 29, 2001 10:46 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into My
Sql


This also works:
INSERT INTO vcstats VALUES( NULL,column2,column3,column4,column5)

The NULL value will be replaced with theauto-incremented value in the table
-Original Message-
From: Ricky Theil [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 29, 2001 10:26 AM
To: '[EMAIL PROTECTED]'; Robby Whiteside; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into My
Sql


If your first field is an auto insert field, then you have to do it like
this:

insert into tablename (column2,column3,column4,column5) values
(value2,value3,value4,value5)

The auto incremented field will be automatically be filled in with the next
available value.

Ricky

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 29, 2001 9:24 AM
To: Robby Whiteside; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] HELP PLEASE!! Get query error when inserting into
MySql


If any of the values you are trying to insert are not integers, you need to 
put single quotes around the variables, ie. $SCRIPT_NAME, $date, $BName, etc

in the insert statement.


Robby Whiteside [EMAIL PROTECTED] said:

 Hi There,
 
 I have a query whenever I try to insert something into a mysql table.
 This
is 
 the code I am using:
 ?
 
 $host1 = gethostbyaddr($REMOTE_ADDR);
 $date = date(Y-m-d h:i:s);
 $link = mysql_connect($host, $user, $passwd);
 mysql_select_db($database, $link); $sql = INSERT INTO vcstats 
 VALUES('', $SCRIPT_NAME, $date,
$HTTP_USER_AGENT, 
 $BName, $BVersion, $BPlatform, $REMOTE_ADDR, $host1); $result =
 mysql_query($sql) or die(query errorBr . mysql_error()); 
 mysql_close();
 
 ?
 
 Thanks,
 Robby
 
 -
 This message was sent using Endymion MailMan.
 http://www.endymion.com/products/mailman/
 
 
 
 --
 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 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] Subject: RE:Please Confirm!! Yes I want to Optin RE: php-db@lists.php.net

2001-10-05 Thread Ricky Theil

Obviously someone pretty smart.

-Original Message-
From: Sterling [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 05, 2001 2:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Subject: RE:Please Confirm!! Yes I want to Optin RE:
[EMAIL PROTECTED]
Importance: High


You [EMAIL PROTECTED],  or someone using your email 
[EMAIL PROTECTED] address, posted  to my Blastomatic site. This is a one
time 
emailing to ask you to verify your email address. Just reply 
to this email address to verify or follow the below instructions.
*
To receive the Blastomatic please click on the following link:
http://oneop.blastomatic.com/rainforest 
And Optin from this site.

To receive my Weekly News Update reply to:
mailto:[EMAIL PROTECTED]?Subject=BLASTOMATIC

Sincerely,
  Sterling White

**
This email is sent in compliance with our strict anti-abuse 
regulations. We are attempting to verify your email address. 
This message is only a request to verify. It is not in any 
way to be construed as a commercial message. If you do not
wish to receive any mail from our servers, do not reply to 
this email nor click on any links. If you wish to have your 
email address blocked from our servers from further 
verification requests please go to 
http://inetekk.com/abuse.html
 Thank you!!  Sterling White
***



-- 
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] Cybercash? or Who?

2001-10-03 Thread Ricky Theil

I just recently started using Cardservice International for all my
precessing.  The only drawback was that I had to purchase an API wrapper,
but it is a PHP wrapper.  It was $95.  It's extremely fast, and easy to use.
Documentation isn't the best, but their support is awesome!

Ricky

-Original Message-
From: Dan Harrington [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 02, 2001 9:14 PM
To: Jason Caldwell; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Cybercash? or Who?


Go payflow pro.  Its awesome.  Substantially the fastest processor out there
in my opinion.

I use it with PHP and its awesome.  I've used Miva, 
Cybercash (before it was Verisign), and many others.



 -Original Message-
 From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 5:15 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Cybercash? or Who?
 
 
 Does anyone have any recommendations on a Credit Card Processing 
 solution to use with PHP?  I researched CyberCash's CashRegister 
 deal about 6 months ago -- now Verisign has taken over CyberCash, and 
 have replaced CashRegister with PayFlowPro --
 
 Looking at the pricing, etc... don't know if it was a better deal than 
 CashRegister... not that it matters anymore :-)
 
 I'm basically looking to not get raped with Merchant and Monthly 
 fees... but still get a good, quick and reliable processing package.
 
 Thanks.
 Jason
 [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 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] Bug in new PHP Version?

2001-10-03 Thread Ricky Theil

Looks like you've got the answer to your question, right there

use mysql_select_db() and mysql_query() instead.

I use 4.06 and have never used the mysql_db_query function.

-Original Message-
From: Luditus [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 2:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Bug in new PHP Version?


Hi there,

I just downloaded the new 4.06 PHP Version and installed it on a new
machine.

My application does not work properly anymore, nor does mysqladmin.

This are some warnings:


Warning: mysql_db_query is deprecated; use mysql_select_db() and
mysql_query() instead in c:\dokumente und
einstellungen\administrator\desktop\my
files\projects\globosapiens\07_production\actual\mysqladmin\lib.inc.php on
line 506


Warning: Undefined variable: picture in c:\dokumente und
einstellungen\administrator\desktop\my
files\projects\globosapiens\07_production\actual\gallery\app_local\dsp_album
.inc on line 273



Does anybody have an idea?

Cheers Andy



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

2001-10-03 Thread Ricky Theil

There is a certain amount of the script that the browser can display before
the script is done loading.  I'm not sure exactly how much that is, but I've
seen this before.  I wrote a script that pulls info out of a mssql DB, and
it shows the top part of my script while pulling DB info.  It's because I
display a ton of stuff before the query is performed.

If there's not enough stuff before the query is executed, it doesn't show
anything.  If there's too much, it shows up to a certain point.

Ricky

-Original Message-
From: Luditus [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 2:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Performance boosting


Hi there,

my phpsite shows always a white page while accessing the db. Sometimes for
seconds. How can I change it to a style like for example php.net does. While
it is searching the db it shows the php logo and the header of the html
site. It looks like that: http:www.globosapiens.net/gallery

Cheers Andy



-- 
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] what's the current URL

2001-10-03 Thread Ricky Theil

Use the phpinfo(); function to show you all the environment variables.  i.e.
the current file URL w/o the query string on it is $PHP_SELF

Ricky

-Original Message-
From: Francisco Carvalho [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 2:51 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP-DB] what's the current URL


Is there a way for PHP to know the current URL?
 
I have am include file that a TOC, I want to change the color of a specific
link in the TOC to ilustrate that that is the corrent page the user is at.
Any sugestions?
 
Thanks a bunch :-)
Franky

-- 
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] what's the current URL

2001-10-03 Thread Ricky Theil

$PHP_SELF returns the full URL of the current script. i.e. $PHP_SELF
http://domain.com/script.php

-Original Message-
From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 3:30 PM
To: Francisco Carvalho; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] what's the current URL


I don't think there is a predefined variable that actually contains the URL
as it appears in the user's address bar, but it would be easy to make a URL
from the Globals.  Check the variables listed on your server in a phpinfo.
It will probably be as simple as:

$url = http://; . $HTTP_HOST . $SCRIPT_NAME;

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Francisco Carvalho [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 3:50 PM
Subject: [PHP-DB] what's the current URL


 Is there a way for PHP to know the current URL?

 I have am include file that a TOC, I want to change the color of a
specific
 link in the TOC to ilustrate that that is the corrent page the user is 
 at. Any sugestions?

 Thanks a bunch :-)
 Franky



-- 
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] mssql functions on unix

2001-09-26 Thread Ricky Theil

Where do these functions come from on a unix box?  I've never had to connect
to a mssql DB from a unix machine, but have run into the point where I must.
I have plenty of scripts on a windows machine connecting to a mssql DB, but
I don't see a configure option to include the mssql functions when compiling
php.
 
Any help is appreciated :)
 
Thanks,
 
Ricky



RE: [PHP-DB] mssql functions on unix

2001-09-26 Thread Ricky Theil

When running make on php, I get the following errors:

/home/rtheil/php-4.0.6/ext/sybase/php_sybase_db.h:67:22: sybfront.h: No such
file or directory
/home/rtheil/php-4.0.6/ext/sybase/php_sybase_db.h:68:19: sybdb.h: No such
file or directory
/home/rtheil/php-4.0.6/ext/sybase/php_sybase_db.h:69:22: syberror.h: No such
file or directory

make[2]: *** [internal_functions.lo] Error 1
make[2]: Leaving directory `/home/rtheil/php-4.0.6/main'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rtheil/php-4.0.6/main'
make: *** [all-recursive] Error 1

Is there something I'm missing??  Here's the configure I ran:
./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.19
--with-sybase --enable-track-vars

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 26, 2001 10:48 AM
To: Ricky Theil; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] mssql functions on unix


Ricky,

Compile --with-sybase will give you an older TDS support, and allow you to
use the sybase_functions with MS SQLServer 6 and 7.

If you need to connect PHP on Unix to MS SQLServer 2000 you will want to use
ODBC. Howto's are available on preparing PHP with ODBC at www.iodbc.org.

Hope this helps.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: Ricky Theil [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 26, 2001 12:25 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] mssql functions on unix


 Where do these functions come from on a unix box?  I've never had to 
 connect to a mssql DB from a unix machine, but have run into the point
 where I must.
 I have plenty of scripts on a windows machine connecting to a
 mssql DB, but
 I don't see a configure option to include the mssql functions
 when compiling
 php.

 Any help is appreciated :)

 Thanks,

 Ricky


-- 
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] Huw do I perform update? I missed the accual code bit.. sorry

2001-09-26 Thread Ricky Theil

I have no problem updating integer and float fields when putting them in ''
if you update an integer with a blank value, it makes the value in the db
=0. always on unix and mysql, though.

Ricky

-Original Message-
From: Brian Paulson [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 26, 2001 11:41 AM
To: 'Rick Emery'; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Huw do I perform update? I missed the accual code
bit.. sorry 


Id news_id an integer?

$query = UPDATE dvd.news_categories SET 
newscategory='$newscategory', 
newscat_status='$newscat_status' WHERE newscat_id='$newsid';
  ^ if this is an
integer in the datebase then it wont update  proproly.

Should look like this

$query = UPDATE dvd.news_categories SET 
newscategory='$newscategory', 
newscat_status='$newscat_status' WHERE newscat_id = $newsid;

Hope this helps

Thank You
Brian Paulson
Sr. Web Developer
The Pueblo Chieftain Online
[EMAIL PROTECTED]
http://www.chieftain.com 


 -Original Message-
 From: Rick Emery [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 26, 2001 10:59 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] Huw do I perform update? I missed the 
 accual code bit.. sorry 
 
 
 What does table look like?
 What does preceding code look like?
 What error message are you getting?
 
 Try printing the value of $query.  What does it look like?
 Copy/paste that into mysql directly; what error do you get?
 
 -Original Message-
 From: Tommy Nilsson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 26, 2001 11:14 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Huw do I perform update? I missed the
 accual code bit.. sorry 
 
 
 Sorry,:
 This is my query:
 $query = UPDATE dvd.news_categories SET
 newscategory='$newscategory', 
 newscat_status='$newscat_status' WHERE newscat_id='$newsid';
  
 but it doesn't seem to work.
  
 help anyone?
  
 //Tommy
 
 --
 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] PHP 4.05 Oracle 8

2001-09-19 Thread Ricky Theil

I need to set up PHP to work on a Windows 2000 machine with IIS 5, PHP 4.05
and Oracle 8.0.5 installed.  I was having problems with the connection and
kept getting all kinds of errors about the TNSNAMES file, but now I'm
getting this error.
 
Warning: _oci_open_server: ORA-12699: Native service internal error in
c:\inetpub\wwwroot\radar\index.php on line 6
 
Here's the code I'm using:
 
?
$db = (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 206.195.70.231)(PORT = 1522))
 (CONNECT_DATA = (SID = radw))
);
$dbh = ocilogon(system,manager,$db);
?
 
Can anyone help with this problem??
 
Thanks