Re: [PHP-DB] Echoing a variable within a variable.

2009-01-06 Thread Micah Gersten
If you use preg_replace with the e modifier, you can run eval on the variables only: http://us.php.net/preg_replace Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Phpster wrote: > A couple of options: > > 1. Use eval($databaseString); there are ri

Re: [PHP-DB] Move from PHP4 to PHP5 , and to Zend Platform - any gotchas? (MYSQL and SQL SERVER)

2008-12-11 Thread Micah Gersten
That is due to register_globals being on by default in PHP4 and off by default in PHP5. It is a security risk and should not be used. I believed it is being removed in PHP 6. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Gunawan wrote: > i don't kn

Re: [PHP-DB] global not solving my problem

2008-11-30 Thread Micah Gersten
> $rowID = $newArray['LOG_ID']; > $rowInsert = $rowID; > print_r($dFields); > print ($rowInsert); > //note that we do not rely on the

Re: [PHP-DB] php5/oci8/oracle 11g1 insert doesn't work ..updated..sorry

2008-11-23 Thread Micah Gersten
roblem but oci_execute has commit as default! > > The table has no primary key defined since no values are unique. > > I have a similar table with a row id! > > > > > One thing that jumps out at me is the insert query. You have: $stid = oci_parse($conn, &#x

Re: [PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Micah Gersten
Chris wrote: > Micah Gersten wrote: >> Chris wrote: >>> Micah Gersten wrote: >>>> Which is the fastest driver for this? >>>> ADODB >>>> PDO >>>> mysqli >>> Either mysqli or pdo since they'd deal with the mysql client d

Re: [PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Micah Gersten
Chris wrote: > Micah Gersten wrote: >> Which is the fastest driver for this? >> ADODB >> PDO >> mysqli > > Either mysqli or pdo since they'd deal with the mysql client directly. > > ADODB is a php library, so it's not going to be as fast

[PHP-DB] PHP MySQL Driver Choice -- Fastest?

2008-11-19 Thread Micah Gersten
Which is the fastest driver for this? ADODB PDO mysqli Anything else? -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] query optimization - DB

2008-09-26 Thread Micah Gersten
MySQL queries use 1 index per table, so to speed the query, we need to know what indices you have for the 2 tables. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Yves Sucaet wrote: > Oh, sorry I forgot to mention this. It's a MySQL

Re: [PHP-DB] query optimization

2008-09-25 Thread Micah Gersten
Other question is, what DB is this for? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com YVES SUCAET wrote: > How could I rewrite the following query so it runs faster: > > select distinct location from blockunit where blockid in ( > select bu.

Re: [PHP-DB] query optimization

2008-09-25 Thread Micah Gersten
What indices do you have? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com YVES SUCAET wrote: > How could I rewrite the following query so it runs faster: > > select distinct location from blockunit where blockid in ( > select bu.blockid from

Re: [PHP-DB] how is this line a security risk?

2008-09-23 Thread Micah Gersten
Only is register_globals is on can that reset a variable. You are correct though, defining directory paths is safer. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Joseph Crawford wrote: > read up on register_globals. It is a security risk because if i

Re: [PHP-DB] Re: Building WHERE SQL clauses

2008-09-16 Thread Micah Gersten
The USING operator is when the column is being used for the Join. Here, the OP just wanted to look up the same values in both tables, not join the results. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Neil Smith [MVP, Digital media] wrote: > >>

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Micah Gersten
You'll actually want to have the User Id in the clocking table, not the other way around. User Id is the foreign key because it has a many to one relationship with the time logging. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Philip Thompson

Re: [PHP-DB] Question about databases and foreign keys

2008-09-15 Thread Micah Gersten
Use 2 tables. You never know what the app might grow into and you should do it right the first time. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: > Hi everyone, > > I just wanted to make sure that I am not making somet

Re: [PHP-DB] MySQL Reporting Tool

2008-09-04 Thread Micah Gersten
Anything Open Source? One of my friends uses SQL Server Reporting Services and was wondering if there is a similar product for MySQL. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Chris wrote: > Micah Gersten wrote: >> Anyone use one, hopefully w

[PHP-DB] MySQL Reporting Tool

2008-09-04 Thread Micah Gersten
Anyone use one, hopefully written in PHP? -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Probleme with MySQL queries

2008-09-03 Thread Micah Gersten
Can you turn on mysql query logging and see what is actually happening? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com David DURIEUX wrote: > Bonjour, > > Yes I'm using this query and no row select > > Cordialement, >

Re: [PHP-DB] Probleme with MySQL queries

2008-09-03 Thread Micah Gersten
You have to pass mysql_num_rows a $result variable from your query. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com David DURIEUX wrote: > Bonjour, > > > > Cordialement, > > David DURIEUX > Tel : 04.74.04.81.34 > Port : 06.

Re: [PHP-DB] Probleme with MySQL queries

2008-09-03 Thread Micah Gersten
What does mysql_error return? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com David DURIEUX wrote: > Bonjour, > > > string(40) "SELECT * FROM table WHERE id=107 " > string(3) "107" > string(38) "DELETE

Re: [PHP-DB] Im new to this but...

2008-09-02 Thread Micah Gersten
In the HTML, you either need to use or, if you have short tags on, , not . Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Chris Hale wrote: > I have: > Apache 2.0.59 > MySQL 5.0.41 > PHP 4.4.7 & 5.2.5 > > and this is my progr

Re: [PHP-DB] Adding 's

2008-08-31 Thread Micah Gersten
Check this function out for the line breaks: http://us.php.net/nl2br Not quite sure what to do for the bold thing. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ron Piggott wrote: > I have the following saved in one column of a mySQL table: >

Re: [PHP-DB] Problem with updating MySQL table

2008-08-27 Thread Micah Gersten
Putting commands into input containers in HTML is deprecated in the XHTML specification. You should use this instead in the input: readonly="readonly" Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: > > On Aug 27, 2

Re: [PHP-DB] I want to remove the last comma

2008-08-12 Thread Micah Gersten
Create an Array in the loop and then join with ",\n". Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com A. Joseph wrote: > This the script > $dir = "images"; > $d = opendir($dir); > $out = " > var tinyMCEImageList =

Re: [PHP-DB] PHP Self pages

2008-08-12 Thread Micah Gersten
Try this: http://xajaxproject.org/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED] wrote: > I have three PHP pages that post data to each consecutive page. > > I would like the second page, the one with a pull down menu of cus

Re: [PHP-DB] Help to improve MySQL query

2008-08-11 Thread Micah Gersten
Use an appropriate status. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dee Ayy wrote: > On Fri, Aug 8, 2008 at 5:25 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > >> How about "select Incidents.* from Incidents inner join C

Re: [PHP-DB] $_SESSION issues - possible security hole?

2008-08-10 Thread Micah Gersten
There's your answer. With register_globals on $_SESSION['rights'] becomes $rights and when you do extract($row) you are overwritting the $_SESSION variable. A safer way of using your code would be: while ($row = mysql_fetch_array($result1, MYSQL_ASSOC)) { ?> - http://w

Re: [PHP-DB] Help to improve MySQL query

2008-08-08 Thread Micah Gersten
How about "select Incidents.* from Incidents inner join Calls on Incidents.id=Calls.incidentid where Calls.status='Open'"? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dee Ayy wrote: > A database was designed with the followin

[PHP-DB] Anyone use FileMaker

2008-08-07 Thread Micah Gersten
I'm wondering if anyone here has experience integrating FileMaker with PHP using either ODBC or JDBC. -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com -- Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com --

Re: [PHP-DB] PHP5 and Multiple Database Connections

2008-08-05 Thread Micah Gersten
Is it set up as a system DSN or User DSN. Try testing an app as the same user as the webserver and see if you can connect to the DSN. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED] wrote: > Here are the messages that are curren

Re: [PHP-DB] PHP5 and Multiple Database Connections

2008-08-05 Thread Micah Gersten
What does the connector return to you when you connect in PHP? Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED] wrote: > Yes I am sure the ODBC works as it is installed on my laptop and I use Excel > to import many various queries o

Re: [PHP-DB] PHP5 and Multiple Database Connections

2008-08-05 Thread Micah Gersten
Have you tested the DSN outside of PHP? Openoffice.org Database has facilities to test ODBC connections. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com [EMAIL PROTECTED] wrote: > Hello Everyone! > > I am currently writing a sequence of php pages t

Re: [PHP-DB] How to import data from Oracle 10g to MySQL 5.0

2008-07-30 Thread Micah Gersten
Have you looked into PHPMyAdmin? http://www.phpmyadmin.net/home_page/index.php There's an option for importing an oracle sql file. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com santoso berkah wrote: > Dear friends, > > I would ask to you a

Re: [PHP-DB] Run SQL query when click on OK button of warning message

2008-07-27 Thread Micah Gersten
if you want to do this type of thing often and have useful interaction: http://xajaxproject.org/ Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com sempsteen wrote: > It seems you've a long way to go. Here is what i can say for you. > First of

Re: [PHP-DB] Mysql logs

2008-07-23 Thread Micah Gersten
You have to edit your my.cnf file. Here's a link to the docs: http://dev.mysql.com/doc/refman/5.0/en/log-files.html Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Manoj Singh wrote: > Hi All, > > Please help me to set the logging on in mys