to the database.
$sql = BEGIN; select my_function('my_refcursor'); FETCH ALL from
'my_refcursor';;
$p = $database-query($sql);
$p-execute();
$result = $p-fetchAll();
$p-closeCursor();
-
Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital
(613) 549- x4294
, and then pass the value as a parameter.
http://www.postgresql.org/docs/8.3/interactive/sql-insert.html
By the way, for obvious reasons, you should be using parameterized
queries to prevent SQL injection.
Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital
(613) 549-
-multiple-result
-sets-using-pdo-and-postgresql
Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital
(613) 549- x4294
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
is not
really preparing the statement (as it should for performance reason),
but it is just substituiting values to compose a SQL (just for your
convenience).
On 10/31/08, Matthew Peltzer [EMAIL PROTECTED] wrote:
Are pdo bound parameters within an ORDER BY clause broken in php 5.2.5?
I find
of bound variables does not match number of
tokens error.
So it appears the parsing mechanism is funcitoning, but what ever is
responsible for binding to ORDER BY is not.
I've looked in bug reports and the change logs, but did not find a
explicit reference to this issue.
--
-- Matthew Peltzer
Hi fellow php late night peoples
Thanks for everyone's help the last couple of days...
I have learned so much. The best way to learn this stuff...is simple trial and
error...
and thanks for good old Ggle!
My problem tonight is very simple. I just don't know what command I want to
Hello Everyone,
Got another simple problem here
I am trying to do a if statement inside a while (mysql_fetch_array)
Here is my code:
if ($link = mysql_tech_array($links)) {
do {
if ($_GET['page'] = $link[file]) {
$status = 'reg_button.php';
} else {
$status = 'push_button.php';
}
Thanks Chris...
added the extra =
and its working fine...
Have a nice day everyone
Matt
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Matthew Ferry [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Tuesday, February 13, 2007 11:53 PM
Subject: Re: [PHP-DB] IF statement
Hello Everyone
Got a simple / stupid question.
Worked on this all night. I'm over looking something very basic here.
The query event_time brings back the calendar id for each event that is
pending in the future.
ie 12, 13, 14, 26 (There could be 100 of them out there)
The second query
;
} while ($event = mysql_fetch_array($events));
} else {
echo No Public Events Are Currently Scheduled...;
}
?
- Original Message -
From: Matthew Ferry [EMAIL PROTECTED]
To: php-db@lists.php.net
Sent: Monday, February 12, 2007 11:14 AM
Subject: [PHP-DB] SQL Query - Using variable from
Hello,
I need to query two different tables and create one BIG array.
I can query both tables, but can't find a way to combine the results in one
array.
The problem comes in with the second table. It has a weird layout.
The second table only has four fields. They are: contact_id,
of the first table
Thanks...
Matt
- Original Message -
From: Natalie Leotta
To: Matthew Ferry
Sent: Friday, January 12, 2007 3:41 PM
Subject: Re: [PHP-DB] 2 queries -- 1 array
I think this will help, but I'm not sure I understood your question correctly.
http
yeah..that is what i'm trying to do, but
I need to query WHERE contact_name='Supplier' and bring back the value for
contact_value
query WHERE contact_name='RANO' and bring back the value for
contact_value
query WHERE contact_name='Dynamic' and bring back the value
query1 = SELECT * FROM egw_addressbook
query2 = SELECT contact_id, contact_value FROM egw_addressbook_extra WHERE
contact_name='Supplier'
query3 = SELECT contact_id, contact_value FROM egw_addressbook_extra WHERE
contact_name='RANO'
query4 = SELECT contact_id, contact_value FROM
Hello everyone
I'm back working on the website again... I'm having lots of fun.
I have a sql query that looks at one field in a database. (result2 query)
Then i have mysql_fetch_array statement.
I then use this array to print links on the page.
Works fine except I don't want duplicate links.
it.
On Sat, 6 Aug 2005, Ron Piggott wrote:
What is the correct $_SERVER that tells me what page is currently being
displayed? Ron
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit
is
connecting to the master db server when performing the write operation?
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to ensure it doesn't occur. However, if the error isn't
critical, and your script can continue to function even if it occurs,
suppressing the error often is a viable option.
--
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/
--
PHP Database Mailing List (http
, and you're using
Apache):
.htaccess:
php_value session.use_cookies 0
Try that and see if it works.
--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156
and prevent headaches
later on.
By the way, if you want some best practices for escaping data before
placing into a database, the manual page for mysql_real_escape_string
has some examples:
http://php.net/mysql_real_escape_string
--
Matthew Weier O'Phinney | WEBSITES:
Webmaster
!
- Matthew
-Original Message-
From: Brad Webb [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 04, 2005 12:21 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Transfering post data to a series of pages.
You may also consider using sessions to store form data.. this allows
for actual user
ASP does this with %Server.Transfer (transferpage1.asp)%
Is there a counterpart with PHP?
- Matthew
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
or is there really no problem?
There's no problem. PhpDoc goes into comments; there's no interaction
with code whatsoever.
--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251
element returned by getimagesize() is the
image MIME type.
--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
mailto
with:
SELECT *
FROM table
WHERE
date_received LIKE '$todays_date' OR
date_received LIKE '$yesterdays_date'
ORDER BY
prayer_request_reference ASC
--
Matthew Weier O'Phinney | WEBSITES:
Webmaster and IT Specialist | http://www.garden.org
National Gardening Association
of the path?
Thank you for your time,
Matthew Perry
have never tried something like this before.
- Matthew
-Original Message-
From: Martin Norland [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 16, 2005 10:09 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] grabbing data from other peoples sites
Perry, Matthew (Fire Marshal's Office
know where we should start.
- Matthew
to enable GD?
- Matthew
be done quite quickly.
Anyways, it's a moot question now -- I've got the data in, and I'm
pretty happy with the results I've seen.
On Friday 11 February 2005 11:56 am, Matthew Weier O'Phinney wrote:
* Micah Stevens [EMAIL PROTECTED]:
Sounds like a self join should work wonders.
I didn't
?
- Matthew Perry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
* Martin Norland [EMAIL PROTECTED]:
Matthew Weier O'Phinney wrote:
I have a table which contains the following:
id (primary key, auto incrementing)
app_id (integer, foreign key)
resource_id (integer, foreign key)
word
score
(This is a search index.) I want
to include ?php instead of ? from now on just
to be sure.
Thank you very much for your help.
- Matthew Perry
-Original Message-
From: Martin Norland [mailto:[EMAIL PROTECTED]
Sent: Friday, February 11, 2005 10:47 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Excel headers not working
)
completely fixed, and it may be something I can't fix.
On Thursday 10 February 2005 07:56 pm, Matthew Weier O'Phinney wrote:
I have a table which contains the following:
id (primary key, auto incrementing)
app_id (integer, foreign key)
resource_id (integer, foreign key
that this is reasonable.
In a previous incarnation of the script, I was looping through each word
of each resource_id and then selecting out of tmp1 based on the single
word value. The results were very different (very few matches), and,
again, the script ran long.
Any ideas?
--
Matthew Weier
collapsing menus?
Thank you for your time,
- Matthew Perry
the session array and
it works beautifully now.
Thank you all for your advice!
- Matthew
-Original Message-
From: Simon Rees [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 25, 2005 4:25 PM
To: php-db@lists.php.net
Cc: Perry, Matthew (Fire Marshal's Office)
Subject: Re: [PHP-DB] IIS, PHP
to change
in my own code so that it works with IIS instead of Apache.
Thank you for your time,
Matthew Perry
EMPLOYEE SET STATUS='Inactive' where STATUS 'Active';
UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS IS NULL';
UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS = '';
UPDATE EMPLOYEE SET STATUS='Inactive' where STATUS = NULL;
- Matthew
postings concerning this topic and will continue researching other sources.
Once again I apologize for the original posting. It was meant to go to one
of my associates (who also does not know the answer!).
- Matthew
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent
This one should be easy for most of you.
What is the SQL query to select the column name for the primary key of a
table?
-Matthew
.
-Matthew
Does anyone know of a FREE program that exports MySQL to access? The trial
versions of the ones I have downloaded do not export all the records of the
database.
- Matthew
and MySQL) or would this just cause problems?
2) If I must use Access, should I use ASP(grrr) instead of PHP?
3) If I must use Access, should I use MS SQL Server(grrr) instead of MySQL?
Thank you all for your time and patience.
- Matthew
-Original Message-
From: Bastien Koert [mailto:[EMAIL
When you export a table to excel, is there a way to merge cells and create
borders? I want my excel file to look exactly like my html table looks.
Matthew Perry
I need some ammo to convince my boss not to use ASP but use PHP instead.
Anyone have some info I can give him?
- Matthew
How do you append both an anchor and a variable to a URL with PHP?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
procedure or
trigger that could do this.
What tools can I use with MySQL instead of procedures or triggers?
Matthew
Does anyone know a free MySQL backup program to schedule regular backups?
How do I provide a password?
I have been trying -p password[mypass] mysqldump sampledb
./backup/file.txt
-Matt
_
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, October 25, 2004 11:24 AM
To: Perry, Matthew (Fire Marshal's Office)
Cc: [EMAIL PROTECTED]
Subject
I am using PHP 4.1
Why would the php function imagecreatefromjpeg() not be recognized?
Fatal error: Call to undefined function: imagecreatefromjpeg() in C:\Program
Files\Apache Group\Apache2\htdocs\Inventory\updateitem.php on line 77
-Matthew Perry
on MySQL Version 4.0.16.max-nt.
Make sure that you are logged in as root.
C : \ select user();
Sometimes MySQL is cryptic about its error messages for security reasons.
dave
Perry, Matthew (Fire Marshal's Office) [EMAIL PROTECTED]
10/19/2004 08:24 AM
To:
[EMAIL PROTECTED]
cc
How embarrassing.
Yes I must have accidentally deleted the table.
I reinstalled and it works fine now.
Thank you very much for your help.
-Matt
_
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 19, 2004 11:14 AM
To: Perry, Matthew (Fire Marshal's
I have tried the step-by-step methods listed on mysql.com for setting a root
password for my local server but I keep getting the message you must have
privileges to update tables in the mysql database to be able to change
passwords for others. What could I be doing incorrectly?
-Matt
I am developing a variety of different web based systems including
inventory, payroll, incident reports etc. Should I create a new database
for each project category or one huge database with every table I will ever
use in it?
-Matt
The MySQL database on my web host has only non-sensitive information.
How bad an idea is it to have a backup copy emailed to me at a
designated time so I don't have to depend on myself and the host for
backups?
I am worried this cheep web host will go out of business and take my
backups with
Anyone know when there will be a version of MySQL that can handle nested
subqueries?
-Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How do I get my PHP funcitons to execute independantly based on what
time of day it is and not on the user?
This may not be how PHP was designed but I would like to do things like
send out an email to someone based on suchandsuch criteria, backup DB on
regular schedule etc.
- Matt
--
PHP
application that can help me with this so I can get away from UI development
back to my DB management?
I realize this is not a web design list server.
Matthew Perry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
forgive the poor structure of my code, im pretty new at this and havent
figured out exactly what it should be formed like to look its best, anyway
whenever i run this code it works on inserting new information into the
database, however when i want to update the SQL query returns an output like
)
Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Wednesday 13 October 2004 04:08, Matthew Kiehne wrote:
database, however when i want to update the SQL query returns an output
like this 'SQL statement = UPDATE badges
(staff,ttlpst,mnthpst,ttlicon,mnthicon) VALUES
Jason Wong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If you look up the manual entry for UPDATE, you'll find that you're
missing
the commas separating the columns.
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design
Does anyone know a good class or program that automatically generates an
ER diagram from all tables in a MySQL database?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Simple question,
How does one import excel and access data to MySQL?
-- Matthew Perry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi, im fairly new to php and mysql and need a little help. im running a
forum community and would like to have it run on multiple databases because
of performance issues others have encountered using the same software on on
database. My question is is it possible to have the software connect to 2
From: Matthew Perry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] microsoft access
Date: Thu, 30 Sep 2004 21:28:48 -0500
Does anyone know of a good online source for using php and microsoft
access. I don't want to have to use asp.
Thank you for your time.
Matthew Perry
--
PHP Database
: input type=text name=email /
input type=submit value=search
/form
all of this is on the same page, the page is called search.php
--
_
Matthew McNicol
yellowmarker.co.uk
PHP / MySQL web development
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit
,
last_modified_date datetime NULL,
);
-Original Message-
From: Matthew McNicol [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 18, 2004 5:46 PM
To: Vincent Jordan
Cc: [EMAIL PROTECTED]
Subject: [SPAM] Re: [PHP-DB] DB table creation question
use the mysql 'auto increment' on a 'int
--
_
Matthew McNicol
yellowmarker.co.uk
PHP / MySQL web development
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
datetime in format of 715041200
/snip
Thanks any help appreciated
Vincent Jordan
Technical Support
Smart Parts, Inc.
Loyalhanna Business Complex
100 Station Street
Loyalhanna, PA 15661
800-992-2147 X 5617
--
_
Matthew McNicol
yellowmarker.co.uk
PHP / MySQL web development
--
PHP Database
?if($logIn != 1) {header(Location: loginError.php);}?
Why does this direct me to loginError.php even when $logIn = 1?
- Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
=page3.php
If I click go on page1.php I SOMETIMES get the cannot be displayed
message. SOMETIMES it works even on her computer!
Anyone know why?
- Matthew Perry
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Everyone,
Thank you very much for your advice about not using PUT. I will use
GET or POST from now on.
I am, however, failing to understand how to use headers to change pages
instead of meta tags.
After checking if the user has logged in correctly I do this:
if ($loginGood){
echo 'meta
What PHP function returns just the first letter of a string?
- Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
My users complain about everything.
The most common is Why do I have to move the mouse over to this box
every time? Wh!
How do I get the cursor to que into the first input area of my form?
-Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
When my users choose an option in the drop down menu, they sometimes
accidentally change what they have chosen when the move the center
scrolling button of their mouse.
I was giving a presentation in front of my company's owner and did this
myself.
5 or so index fingers instantly pointed at
Then I withdraw the question.
Thank you for your time.
John W. Holmes wrote:
matthew perry wrote:
When my users choose an option in the drop down menu, they sometimes
accidentally change what they have chosen when the move the center
scrolling button of their mouse. I was giving a presentation
I have a file uploading function that works well on my local server.
It finds a picture and uploads it into a defined directory.
Unfortunately this function does not work when I try to upload to my web
host.
It says I do not have the proper permissions.
I believe this has to do with the fact
Macintosh users can't log in on my web site.
I don't require anything unusual for log ins - simply a form with a user
id and password that queries a MySQL database.
The form is not encripted and I don't even use any security precautions
for the data transfer (users can't do much anyway).
After
When I insert the following header:
header (Content-type: application/vnd.ms-excel);
header (Content-Disposition: attachment );
I get the messages:
*Warning*: Cannot modify header information - headers already sent by
(output started at C:\Program Files\Apache
Anyone know a quick and easy way to fill in the address on a yahoo maps
form?
I want a link from my page to fill in all the details I already know so
my users don't have to enter it.
- Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Does anyone know a free pdf editor?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I use Windows XP.
Really all I need to do is remove a single line in a pdf file and I
can't convince myself to spend $749 for Acrobat Pro to do it.
- Matt
On 7 Apr 2004, at 16:34, matthew perry wrote:
Does anyone know a free pdf editor?
what platform do you require it for?
--
Mike Karthauser
Bar graphs are very easy to use with PHP. It's just a table columns of
varying height.
I wrote this a long time ago. To be honest it isn't very good code and
I think I got the ideas from someone else.
Regardless it should give you an idea.
You basically pass in an array of dollar amounts and
Does using a pasword input type input name=password type=password
make the transfer more secure from someone sniffing my connection or
does it only shield an onlooker from seeing what the user enters?
- Matt
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
I am accumulating way to many PHP files in my home directory. It is
very difficult to sift through all the files.
I use a lot of includes and requires so it is difficult to organize
them in folders even if I change back a directory with my requires
using ..\.
Does anyone know of a better way
OK lets see if I can figure out how to ask this:
I am setting up a system for my company to filter through employee
applications. Most of the applications do not fit the criteria and I
want to allow my bosses a checkbox to the right of them which they can
check or uncheck to remove an
I am looking for the easiest way to export data to an excel file. Is
the easiest way to use PHP's file handling functions?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
().
http://phundamentals.nyphp.org/PH_storingretrieving.php
Regards,
Filip de Waard
Jimmy Brock
Matthew Perry [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I am trying to allow my users to enter quotes in their strings. For
instance instead of writing:2 inch rod, they can write 2
Hi Piotr,
Everyone else is suggesting edit all of the code.
Alternatively you could setup an iptables rule which forwards all
incoming requests on 127.0.0.1:3306 (or whatever port your mysql server
is running on) to 192.168.0.1:3306 (repolace 192.168.0.1 wit the IP of
your DB server).
This way
by getting all the data into PHP
first and then formatting and sending it to the client. At a minimum you
should be able to determine if the client is the big slow down.
Matthew Vos
Systems Analyst
Product Development
Techcom Software Solutions Inc.
416.398.5764
[EMAIL PROTECTED
, but at the moment I would like
to just work with the query directly in the code if at all possible.
Thanks,
John
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Matthew Vos
Systems Analyst
Product Development
Techcom Software Solutions Inc
I would say try single quotes instead of double quotes ... let me know if
that works ...
Regards,
Matt.
- Original Message -
From: Sean Smitz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, October 17, 2003 4:32 PM
Subject: [PHP-DB] MySQL Query not working via PHP
I have a
of confidentiality on the part of
the winners will result to disqualification.
SORRY FOR THE LATE INFORMATION THANKS
CLARK WOOD
--
Matthew Moldvan [EMAIL PROTECTED]
Trilogy International, Inc.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
approach, but sounds like extra work.
Any ideas? tnks
Matthew J. Horn
Principal
Spielboy.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 1:24 PM
Subject: [PHP-DB] Host check?
http://www.beamhost.co.uk/hosting.html
I'm moving hosts with our site at work...
I found these guys and am very impressed.
Has anyone had any
Well, it looks like your previous response was correct, but $a%$b in this
case returns 4, not the 0.8 as intended ... fmod($a, $b) (I have php 4.1.2,
so I can't test fmod()) will probably return 0.8 though.
As a side note, this message seems a little off-topic ... though it is PHP,
it has nothing
There's probably a better way to do this, but to retrieve only the 0.8 from
24/5 try this:
($a/$b)-floor($a/$b)
Regards,
Matt.
-Original Message-
From: Alain Barthélemy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 12, 2003 5:05 AM
To: php-db
Subject: [PHP-DB] % operator
Hello,
If
Shaun, the MySQL manual suggests that you have hit your limit using the
VARCHAR field type (255 characters). To store 6,000 characters have you not
considered using the TEXT field type?
6.2.3.1 The CHAR and VARCHAR Types
The CHAR and VARCHAR types are similar, but differ in the way they are
In mySQL, I store dates as -MM-DD, a standard DATE type. It stores
users
date of births. I need to calculate in a PHP script, the users age from
this
DOB. I get a PHP date in the same format as the mySQL and subtract, which
returns the year rounded off. ie, it doesnt matter if your
1 - 100 of 266 matches
Mail list logo