Re: [PHP-DB] HELP! PHP 4.4.4 and MySQL 4.1 - Can't find php_mysql.dll

2009-02-19 Thread Chris

John Burns wrote:

I did that but the php_mysql.dll is not in any of the zips from any of
the packages I tried downloading. I need to stay in PHP 4 because of
some applications. No matter what zip package I downloaded,
php_mysql.dll was not in the extensions directory. I tried a bunch of
different 4.x releases. I tried downloading the source code and saw
the mysql extensions uncompiled but I don't know how to compile.
That's why I'm so confused as to why the php_mysql.dll file is not in
any of the Windows binary zip packages. Take a look for yourself and
see if you can find a zip that has that file in it. If you can, I'd be
greatly appreciative.


Please always cc the mailing list so others can see your response and 
offer their suggestions.


Maybe ask on the php-windows mailing list, they might have better 
suggestions (and include what you've already tried).


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


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



Re: [PHP-DB] Two troublesome fields not inserting

2009-02-19 Thread Chris

Terion Miller wrote:

Hi all, I seem to be having a problem with getting two fields to insert into
a table, the other fields insert but not these two
its from a form that is a duplicate, basically I have a workorder that I
want to make a copy of, I call it from the db, populate a form in case
changes want to be made, and insert with a new unique ID as a new record,
it's working great except Two fields will NOT insert and I'm at a loss for
why ...
the code is big so I will post snippets that I think may be the trouble
spots

Here is the insert:
$sql = "INSERT INTO workorders (CreatedDate, Location, WorkOrderName,
AdminID, FormName, Status, Notes) VALUES (";
$sql .= "Now(), '$Location', '$WorkOrderName', '$AdminID', 'WorkOrder',
'New Order', '$Notes')";
mysql_query($sql);
$WorkOrderID = mysql_insert_id();


My immediate guess is either a single quote or a new line is causing the 
problem.


You need to escape your data (use mysql_real_escape_string).

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


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



Re: [PHP-DB] Overriding Built-In Functions and making db connection local

2009-02-19 Thread Chris

brownb...@gmx.net wrote:

Hello,

I'm searching for a possibility to override build-in function.PECL APD isn't a 
possible solution for me. Is there any other possibility to override a built-in 
function or to disallow the call without manipulation the php.ini?


You can't override existing functions (whether they're built in php ones 
or ones you make up yourself).



My second problem is that it is needed for a special framework that the 
conenction to a database isn't set global. I need it to ensure that every 
databasecall is through my class.
Is there any possibility for this?


Nope. You can't just disable the function because your class needs to 
make it, and disable_functions disables that function everywhere, you 
can't tell it to do it for every file but "x.php".


--
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] Two troublesome fields not inserting

2009-02-19 Thread Terion Miller
Hi all, I seem to be having a problem with getting two fields to insert into
a table, the other fields insert but not these two
its from a form that is a duplicate, basically I have a workorder that I
want to make a copy of, I call it from the db, populate a form in case
changes want to be made, and insert with a new unique ID as a new record,
it's working great except Two fields will NOT insert and I'm at a loss for
why ...
the code is big so I will post snippets that I think may be the trouble
spots

Here is the insert:
$sql = "INSERT INTO workorders (CreatedDate, Location, WorkOrderName,
AdminID, FormName, Status, Notes) VALUES (";
$sql .= "Now(), '$Location', '$WorkOrderName', '$AdminID', 'WorkOrder',
'New Order', '$Notes')";
mysql_query($sql);
$WorkOrderID = mysql_insert_id();

Here is the part where it calls the old values:

$sql2 = "SELECT Location, WorkOrderName FROM workorders WHERE
WorkOrderID='$WorkOrderID'";
$result2 = mysql_query ($sql2);
$row2 = mysql_fetch_array($result2);


Here is the form part:


Property:
 


Work
Order Name: 



I need some clues, everything works except the two fields Location, and
WorkOrderName.

Thanks
Terion

Happy Freecycling
Free the List !!
www.freecycle.org
Over Moderation of Freecycle List Prevents Post Timeliness.

Twitter?
http://twitter.com/terionmiller

Facebook:
http://www.facebook.com/people/Terion-Miller/1542024891";
title="Terion Miller's Facebook profile" target=_TOP>http://badge.facebook.com/badge/1542024891.237.919247960.png"; border=0
alt="Terion Miller's Facebook profile">
Katharine Hepburn  - "Life is hard. After all, it kills you."


[PHP-DB] Overriding Built-In Functions and making db connection local

2009-02-19 Thread brownbull
Hello,

I'm searching for a possibility to override build-in function.PECL APD isn't a 
possible solution for me. Is there any other possibility to override a built-in 
function or to disallow the call without manipulation the php.ini?

My second problem is that it is needed for a special framework that the 
conenction to a database isn't set global. I need it to ensure that every 
databasecall is through my class.
Is there any possibility for this?

-- 
Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: 
http://www.gmx.net/de/go/multimessenger01

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