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
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
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
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
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,
-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
-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
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
-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
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
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;
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
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
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
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
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]
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
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
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
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
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
_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
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
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
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
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:
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
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
-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
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
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
--- 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
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
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
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:
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
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
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:
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() +
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
-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
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
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
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
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
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
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,
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,
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,
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
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
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,
52 matches
Mail list logo