[PHP-DB] php problem

2005-01-06 Thread Serenity Schindler
I am new to php and have no idea what I'm doing wrong. I have a file named test.php containing: html head title PHP Test /title /head body pThis is an HTML line p ?php echo This is a PHP line; phpinfo(); ? /body /html The html lines show up just fine but none of the php info is

Re: [PHP-DB] php problem

2005-01-06 Thread Jochem Maas
Serenity Schindler wrote: I am new to php and have no idea what I'm doing wrong. I have a file named test.php containing: html head title PHP Test /title /head body pThis is an HTML line p ?php echo This is a PHP line; phpinfo(); ? /body /html The html lines show up just fine but none of

Re: [PHP-DB] PHP query to mysql database returns emtpy data, but Query Browser shows records

2005-01-06 Thread Jochem Maas
graeme wrote: Hi, You have: $query example = SELECT description from cpProducts where category='39 47 48 172' don't you want to add a logical operator such as OR, possibly AND $query example = SELECT description from cpProducts where category='39 OR 47 OR 48 OR 172' graeme. whatever it is that

Re: [PHP-DB] PHP query to mysql database returns emtpy data, butQuery Browser shows records

2005-01-06 Thread Bastien Koert
Perhaps an IN query clause it what he needs... $query example = SELECT description from cpProducts where category IN (39, 47, 48, 172) bastien From: Jochem Maas [EMAIL PROTECTED] To: graeme [EMAIL PROTECTED] CC: Jason Walker [EMAIL PROTECTED], php-db@lists.php.net Subject: Re: [PHP-DB] PHP query

Re: [PHP-DB] str_replace question

2005-01-06 Thread Brent Baisley
I can't think of an instance where a query would have the phrase WHERE AND. Perhaps if you post the contents of the $additionalsql variable, we can tell you why it's not working. You may actually be looking to use an array for your search words in str_replace(), or perhaps grep. On Jan 5,

RE: [PHP-DB] Re: MySQL version issue

2005-01-06 Thread Norland, Martin
-Original Message- From: Doug Thompson [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 05, 2005 8:44 AM I isn't my intention to start a peeing contest, but if *you* get rid of the chip and actually read the manual excerpt, the equivalent SQL statements it cites are very

RE: [PHP-DB] php problem

2005-01-06 Thread Norland, Martin
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 7:13 AM Subject: Re: [PHP-DB] php problem if so then PHP is not either: 1. your webserver is not configured to use php to handle files with a php extension. 2. your webserver does

Re: [PHP-DB] str_replace question

2005-01-06 Thread Bastien Koert
whats likely happening is the sql is being built on the fly. and he's malformed it somewhere... A neat little trick would be to create the initial part of the statement with a predefined where clause based on some record state. For instance, we use a record_deleted field, since we don't delete

RE: [PHP-DB] str_replace question

2005-01-06 Thread Norland, Martin
-Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:34 AM Subject: Re: [PHP-DB] str_replace question [snip] A neat little trick would be to create the initial part of the statement with a predefined where clause based on some

[PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Stuart Felenstein
I am working on update areas for my end users. This is where they can go in and update and / or edit information in their profile. The problem I'm having a hard time getting my hands around are those areas where they can have multiple entries. One of the tables allows for a user to enter up

[PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
Hi all I am new to PHP and am trying to connect to mysql for the first time. I get activity on the mysql monitor when I run it, but get the following error. DB Error: connect failed The lines of code are: require_once( DB.php ); $dsn = mysql://.DB_USER.:.DB_PASS.@.DB_SERVER./.DB_NAME; echo $dsn;

Re: [PHP-DB] PHP query to mysql database returns emtpy data, butQuery Browser shows records

2005-01-06 Thread jwalker
No the category field is varchar(250) and uses spaces to parse each element within the field. The database is an osCommerce hybrid - not my own. The values within the category field go from one number to an X set of numbers, separated by spaces. This is making development rather difficult

RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Hutchins, Richard
What version of PHP? What version of MySQL? -Original Message- From: Jason Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 10:42 AM To: php-db@lists.php.net Subject: [PHP-DB] Trying to connext to MySQL with PEAR Hi all I am new to PHP and am trying to connect to mysql

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Wong
On Thursday 06 January 2005 23:41, Jason Davis wrote: Hi all I am new to PHP and am trying to connect to mysql for the first time. In that case I strongly suggest that you at least vaguely familiarise yourself with using the basic PHP-native mysql_*() functions first. Go through the examples

RE: [PHP-DB] php problem

2005-01-06 Thread Tyler Replogle
whats the php info? From: Serenity Schindler [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] php problem Date: Thu, 6 Jan 2005 05:00:32 -0800 (PST) MIME-Version: 1.0 Received: from lists.php.net ([216.92.131.4]) by mc10-f30.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 6 Jan

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
Pear DB version is 1.6.8 Jason Davis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] MySQL 4.1 PHP 4.3.10 PEAR 0.5.0 (I think, not sure how to test that) On two different boxes one is an XP Pro box one is an Win2K Pro Box both running IIS Richard Hutchins [EMAIL PROTECTED]

Re: [PHP-DB] PHP query to mysql database returns emtpy data, butQuery Browser shows records

2005-01-06 Thread Jochem Maas
jwalker wrote: No the category field is varchar(250) and uses spaces to parse each element within the field. The database is an osCommerce hybrid - not my own. The values within the category field go from one number to an X set of numbers, separated by spaces. This is making development rather

Re: [PHP-DB] str_replace question

2005-01-06 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:34 AM Subject: Re: [PHP-DB] str_replace question [snip] A neat little trick would be to create the initial part of the statement with a predefined where clause based

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
MySQL 4.1 PHP 4.3.10 PEAR 0.5.0 (I think, not sure how to test that) On two different boxes one is an XP Pro box one is an Win2K Pro Box both running IIS Richard Hutchins [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What version of PHP? What version of MySQL? -Original

Re: [PHP-DB] str_replace question

2005-01-06 Thread Jochem Maas
Brent Baisley wrote: I can't think of an instance where a query would have the phrase WHERE AND. Perhaps if you post the contents of the $additionalsql variable, we can tell you why it's not working. You may actually be looking to use an array tried to explain that to him already, either he

Re: [PHP-DB] PHP connect to mysql problem

2005-01-06 Thread Andrew Kreps
On Wed, 5 Jan 2005 15:25:21 +0300, Tsegaye Woldegebriel [EMAIL PROTECTED] wrote: Anybody help! I can't connect from my PHP to mysql using the following code: $link = mysql_connect(localhost, root, merkato) or die(Could not connect : . mysql_error()); it replies with error: Could not

Re: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Andrew Kreps
_really_ need something like this. Or just join them together in PHP. I think the only downside to that solution is that the primary key will continue to increment regardless of the day, and I think the original poster wanted: 20050105-1 20050105-2 20050106-1 ...etc. This would be a great place

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread James Pancoast
In my (very) limited experience with PEAR::DB, I've found that getMessage() doesn't give very verbose error messages :). So if I'm really having a problem, I do all 4 of these: echo 'Standard Message: ' . $db-getMessage() . br\n; echo 'Standard Code: ' . $db-getCode() . br\n; echo 'DBMS/User

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
Ok tried that and go this error message instead. Client does not support authentication protocol requested by server; consider upgrading MySQL client Going to MySQL site to try to figure out what this means/which other clients are available. Jason Davis Jason Wong [EMAIL PROTECTED] wrote in

Re: [PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Andrew Kreps
On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart Felenstein [EMAIL PROTECTED] wrote: The problem I'm having a hard time getting my hands around are those areas where they can have multiple entries. One of the tables allows for a user to enter up to 5 choices. The table would look like

Re: [PHP-DB] select text from a text file

2005-01-06 Thread Andrew Kreps
On Wed, 5 Jan 2005 11:58:59 -, Ed [EMAIL PROTECTED] wrote: Happy new year folks! The titlemight make this seem like an easy to answer question However here's the complicated bit (well for me anyway). In my text file that is written to by the users in a chatroom it looks like this:

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Davis
This helped a LOT! With that info I was able to figure out that I need to do this. http://dev.mysql.com/doc/mysql/en/Old_client.html Thanks everyone, Jason Davis Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thursday 06 January 2005 23:41, Jason Davis wrote: Hi all

[PHP-DB] Warnings and Notices

2005-01-06 Thread Jason Davis
I just got the software I was fighting with working. Only issue now is that the top of the page is filled with notices and warnings, even though the code is working. Is there any way to turn off or hide these notifications? Jason -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] Stopping display of DB errors

2005-01-06 Thread Norland, Martin
-Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 11:36 AM Subject: [PHP-DB] Stopping display of DB errors When I run a query using Interbase and if an error occurs, the error displays in the browser window even though I am testing for

RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 06 January 2005 16:39, Jochem Maas wrote: Hutchins, Richard wrote: echo $dsn; $isPersistant = TRUE; doesn't effect the code but 'Persistant' is spelled 'Persistent' Oh

[PHP-DB] Re: Warnings and Notices

2005-01-06 Thread Jason Davis
Figured it out myself. Changed PHP.ini to read error_reporting = E_ALL ~E_NOTICE instead of error_reporting = E_ALL Jason Davis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I just got the software I was fighting with working. Only issue now is that the top of the page is filled

Re: [PHP-DB] Update / Delete / Insert quandry

2005-01-06 Thread Stuart Felenstein
--- Andrew Kreps [EMAIL PROTECTED] wrote: On Thu, 6 Jan 2005 07:28:32 -0800 (PST), Stuart Felenstein [EMAIL PROTECTED] wrote: The problem I'm having a hard time getting my hands around are those areas where they can have multiple entries. One of the tables allows for a user to

Re: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Jason Wong
On Friday 07 January 2005 02:29, Andrew Kreps wrote: This would be a great place for a stored procedure, but I don't know if I can recommend running MySQL 5 to you. The most platform-safe way I can think of is to get a count(*) of the number of rows with today's date, add 1 to it, and stick

[PHP-DB] mssql_connect issues

2005-01-06 Thread Philip Thompson
Hi all. I have worked with a MySQL database a whole lot, but never really an MS SQL database before. Here's the problem I'm having. I call this function and then nothing else happens. No other information shows up on the page. $link = mssql_connect(myServer, me, pw); Of course, I replace the

[PHP-DB] mssql_connect

2005-01-06 Thread Philip Thompson
Hi again all! Right after I sent the email... I think I figured out what it was! I do not have it `uncommented` in my php.ini file! Therefore, none of the mssql_* functions would work. Sorry for that last email. ~Philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] terminates string?

2005-01-06 Thread Gabino Travassos
Hey Matthew Example: index..php?id=4539page=dest.phpwig=top From this url example I can use the following variables: $id='4539'; $page='dest.php'; $wig='top'; for ampersands, use %26 the same way that spaces are %20 in URLs So, if I wanted to pass a variable that had an ampersand in it, like Tony

RE: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Norland, Martin
will continue to increment regardless of the day, and I think the original poster wanted: 20050105-1 20050105-2 20050106-1 ...etc. This would be a great place for a stored procedure, but I don't know if I can recommend running MySQL 5 to you. The most platform-safe way I can think of is to get

Re: [PHP-DB] terminates string?

2005-01-06 Thread Jochem Maas
Perry, Matthew (Fire Marshal's Office) wrote: I am using PHP 4.3.1 and running Apache Server and MySQL. The following question is probably only related to PHP. Here is the problem: I am passing the following string from one form to another:

Re: [PHP-DB] Stopping display of DB errors

2005-01-06 Thread Jochem Maas
Todd Cary wrote: When I run a query using Interbase and if an error occurs, the error displays in the browser window even though I am testing for errors. Is there a way to prevent this? function db_insert_logon_session($dbh, $sessionid, $offset) { $fulldate = date(m/d/Y H:i:s,time() +

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jason Wong
On Friday 07 January 2005 03:12, Ford, Mike wrote: Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this one: I'm afraid it's afraid ... :-) Doesn't affect the answer, but this occurrence of 'effect' should be 'affect'. ;) Yeah and it annoys me too when people mix up you're and

RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Norland, Martin
-Original Message- From: Ford, Mike [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 1:13 PM Subject: RE: [PHP-DB] Trying to connext to MySQL with PEAR [snip] Oh dear, as a fully-paid-up pedant, I'm afriad I can't resist this one: Doesn't affect the answer, but this

Re: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Jochem Maas
Andrew Kreps wrote: ... 20050105-1 20050105-2 20050106-1 ...etc. This would be a great place for a stored procedure, but I don't know if I can recommend running MySQL 5 to you. The most platform-safe way an open source alternative that does offer this enterprise level functionality (stored

Re: [PHP-DB] Warnings and Notices

2005-01-06 Thread Jochem Maas
Jason Davis wrote: I just got the software I was fighting with working. Only issue now is that the top of the page is filled with notices and warnings, even though the code is working. Is there any way to turn off or hide these notifications? read them and fix your code is one way. another is to

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jochem Maas
Ford, Mike wrote: To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 06 January 2005 16:39, Jochem Maas wrote: Hutchins, Richard wrote: echo $dsn; $isPersistant = TRUE; doesn't effect the code but 'Persistant' is spelled

[PHP-DB] I'm trying to out perform Martin Norland....

2005-01-06 Thread Jochem Maas
in terms of helpfulness and volume of replies to Q's on this list ;-) but it doesn't help that my mails seem to take hours to reach the list (Martin's keep beating mine to show up). is the list-server against me? or do others also see loads of lag? rgds, Jochem PS - as an even bigger kick

Re: [PHP-DB] Warnings and Notices

2005-01-06 Thread Janet Valade
Jason Davis wrote: I just got the software I was fighting with working. Only issue now is that the top of the page is filled with notices and warnings, even though the code is working. Is there any way to turn off or hide these notifications? You can set the error level in php.ini, using the

[PHP-DB] SQL statement syntaxis

2005-01-06 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query (displayed below) works great without the .$_POST['CompanyName']. $query_company_listing = SELECT CompanyID, CompanyName,

[PHP-DB] SQL statement syntaxis

2005-01-06 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query (displayed below) works great without the .$_POST['CompanyName']. $query_company_listing = SELECT CompanyID, CompanyName,

[PHP-DB] SQL statement

2005-01-06 Thread PHPDiscuss - PHP Newsgroups and mailing lists
Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query displayed below works great without the .$_POST['CompanyName']. $query_company_listing = SELECT CompanyID, CompanyName, CompanyOrDepartment,

Re: [PHP-DB] PHP query to mysql database returns emtpy data, but Query Browser shows records

2005-01-06 Thread graeme
Sorry I was in a hurry for lunch.. I meant category='39 ' OR category '47' etc... which of course the IN clause would address. But if it is a character string '39 47 48 172' that is required then double check the number of spaces that are required against those that are produced. Maybe is is

RE: [PHP-DB] PHP query to mysql database returns emtpy data, but Query Browser shows records

2005-01-06 Thread Jason Walker
Graeme - you were moving in the right direction. Since the data in the field is varchar(250), the only thing that changes is the fact that the last number is 3 digits. Other page queries were also affected with 4 x 2 digit numbers in the category field (eg. '37 48 49 52'). By adding '%' between

RE: [PHP-DB] SQL statement

2005-01-06 Thread Jason Walker
First off - $_POST['CompanyName'] is valid, right? Can you do something like this?: if (isset($_POST['CompanyName'])){ $sqlCompanyName = $_POST['CompanyName']; } else { return them back to the form, or something? } $query_company_listing = SELECT CompanyID, CompanyName,