Re: [PHP-DB] Doctrine or another recomended ORM?

2011-02-01 Thread Philip Thompson
http://cakephp.org/ On Jan 16, 2011, at 6:02 AM, Miriam Natanzon wrote: > Hi, > > I want to choose an open-source ORM platform to use as a base for many > different applications as a standard environment in my organization. ( we > used DBI for PERL in the past). > I saw and read about Doctrine

Re: [PHP-DB] Stuck in apostrophe hell

2010-08-02 Thread Philip Thompson
On Aug 2, 2010, at 4:42 PM, Bret Hughes wrote: > I would turn on query logging and see what exactly is making it to mysql. > > Niel Archer wrote: >>> Before I send the following SQL to MySQL from PHP I print it to screen. PHP >>> chokes on it, but I can paste the exact same query from the screen

Re: [PHP-DB] help in implementing a progress bar

2010-01-11 Thread Philip Thompson
On Jan 7, 2010, at 2:36 PM, Vinay Kannan wrote: > Hello, > > Theres this project that I am working on, and a specific module does take > few secs to process, I am thinking it would be cool to be showing a progress > bar(some kind on a .gif image) while the script runs, does any one have an > idea

Re: [PHP-DB] Random pick

2009-12-18 Thread Philip Thompson
On Dec 15, 2009, at 6:02 PM, David McGlone wrote: > On Monday 14 December 2009 21:44:24 Chris wrote: >> Chris wrote: >>> David McGlone wrote: On Monday 14 December 2009 21:02:37 Chris wrote: > David McGlone wrote: >> Hi everyone, >> >> I've been lurking in the shadows on the

Re: [PHP-DB] Group by

2009-12-09 Thread Philip Thompson
On Dec 9, 2009, at 12:58 PM, h...@deweywilliams.com wrote: > The only SELECT is on MAX('timestamp'). There is really nothing to Group BY > in this query. > > Dewey > > Philip Thompson wrote: >> Hi. >> >> In a mysql query, it is recommended that &

[PHP-DB] Group by

2009-12-09 Thread Philip Thompson
Hi. In a mysql query, it is recommended that "GROUP BY" fields be indexed? Using EXPLAIN on one of my queries, I noticed no change between having indexed by GROUP BY field and not indexing it. Any thoughts would be appreciated. In this example, should `history_field` be indexed...? SELECT MAX(

[PHP-DB] Multiple MySQL schemas

2009-12-08 Thread Philip Thompson
Hi all. We are wanting to create an app that contains multiple clients. Each clients has anywhere from 1 user to more than a hundred. We had the idea of separating each client into its own database schema. This reduces the single point of failure - if 1 client db dies, it doesn't kill the other

Re: [PHP-DB] Doc to PDF with mssql

2009-11-07 Thread Philip Thompson
On Nov 4, 2009, at 4:00 PM, Chris wrote: Chris wrote: Rafael Costa Pimenta wrote: But the link http://doc2pdf.sourceforge.net/overview.html seems to use e-mail, i did not understand, I just want to extract a word .doc file from the mssql database, save in a temp directory, convert to the

Re: [PHP-DB] SELECT LIKE with "%" and without "%"

2009-05-04 Thread Philip Thompson
On May 2, 2009, at 6:43 PM, Emiliano Boragina wrote: Hello. I am using this: $sql = "SELECT * FROM table WHERE ID LIKE '%$_GET[id]%' AND title LIKE '%$_GET[word]%'"; But I want exactlu ID, not one part of many possibles Ids in the DB. How can I do that? PLEASE tell me your cleaning that inpu

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

2008-09-15 Thread Philip Thompson
ernal Developer http://www.onshore.com Yes, I agree with that. That was just a quick example that I whipped up (and obviously didn't think enough about). ;) So, follow Micah's advice, people. =D ~Philip Philip Thompson wrote: I'll throw this out there though. When dealing w

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

2008-09-15 Thread Philip Thompson
On Sep 15, 2008, at 10:03 AM, Jason Pruim wrote: On Sep 15, 2008, at 10:59 AM, Micah Gersten wrote: Use 2 tables. You never know what the app might grow into and you should do it right the first time. That's what I was thinking too... Just wanted to hear it from someone else... NOW I get

Re: [PHP-DB] PDO prepared statements and value list for MySQL "IN"

2008-07-08 Thread Philip Thompson
On Jul 8, 2008, at 11:55 AM, TK wrote: I'd like to use a PDO prepared statement to perform a MySQL query that uses the IN function. I.e.: $stmt = $pdo->prepare(' select * from mytable where myfield IN (:contents) ); $stmt->bindValue(':contents', $contents); $stmt->execute(); Here's the

[PHP-DB] SELECT FOR UPDATE

2008-06-02 Thread Philip Thompson
Hi all. Which is more efficient in order to use SELECT FOR UPDATE? %> SELECT * FROM `table` WHERE (`table_id` = 32) LIMIT 1 FOR UPDATE; %> UPDATE `table` SET `field_name` = 'Pizza' WHERE (`table_id` = 32) LIMIT 1; OR %> SELECT `field_name` FROM `table` WHERE (`table_id` = 32) LIMIT 1 FOR

Re: [PHP-DB] Timestamps

2008-05-02 Thread Philip Thompson
On May 2, 2008, at 8:00 AM, Jason Pruim wrote: On May 1, 2008, at 8:31 PM, Chris wrote: PS... Was it you, Jason, or someone else who asked about the security of the community knowing their database structure and I encouraged the use of `backticks` around all field and table names? Yeah i

Re: [PHP-DB] Timestamps

2008-05-01 Thread Philip Thompson
On May 1, 2008, at 7:56 AM, Jason Pruim wrote: On Apr 30, 2008, at 5:03 PM, Philip Thompson wrote: On Apr 30, 2008, at 10:54 AM, Jason Pruim wrote: Hi Yves, Thanks for the tip, that worked, I think I'll use that from now on.. Just out of curiosity though, any idea why it wasn't

Re: [PHP-DB] Timestamps

2008-04-30 Thread Philip Thompson
On Apr 30, 2008, at 10:54 AM, Jason Pruim wrote: Hi Yves, Thanks for the tip, that worked, I think I'll use that from now on.. Just out of curiosity though, any idea why it wasn't working as I was writing it :) Did you try putting the query that PHP is generating in phpMyAdmin or MySQL Qu

Re: [PHP-DB] playing longblob media

2008-04-29 Thread Philip Thompson
On Apr 28, 2008, at 9:22 AM, Ron wrote: hi yves, not sure how large the file is, but i'm assuming a caller would not leave a voicemail longer than a minute. max maybe 30 secs. is there a query to get the size of a data in a certain row/column? thank you regards ron Assuming you're stori

Re: [PHP-DB] playing longblob media

2008-04-29 Thread Philip Thompson
On Apr 28, 2008, at 12:49 AM, Chris wrote: Philip Thompson wrote: On Apr 27, 2008, at 9:15 AM, Ron wrote: Hi, How can i retrieve via php a media stored in a mysql database as longblob? I'd like to be able to retrieve the media and stream it. TIA regards, ron Just like any other

Re: [PHP-DB] playing longblob media

2008-04-27 Thread Philip Thompson
On Apr 27, 2008, at 9:15 AM, Ron wrote: Hi, How can i retrieve via php a media stored in a mysql database as longblob? I'd like to be able to retrieve the media and stream it. TIA regards, ron Just like any other field type. Doesn't matter to PHP what the field type is... $sql = "SEL

[PHP-DB] UPPER(AES_DECRYPT(...)) bug?

2008-04-01 Thread Philip Thompson
Hi all. Here's my disclaimer: this question is solely MySQL-related - I just happen to be programming in PHP. I have found some functionality which *appears* to be a bug, but I didn't want to report it before asking some intelligent people. I have this simple query: SELECT UPPER('just a

[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: ht

[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

[PHP-DB] Aliased mysql queries and mysql_fetch_array()

2004-10-22 Thread Philip Thompson
Hi all. I am having a problem obtaining the specific information I need. I have a table of "people" that can have multiple rows - ie, Director, Manager, etc. However, in the "projects" table, each project has a director AND manager, but not necessarily the same person. I have the query to pull

Re: [PHP-DB] mysql_query

2004-10-12 Thread Philip Thompson
On Oct 12, 2004, at 7:15 AM, [EMAIL PROTECTED] wrote: hello, I have a begining question. I've got simple html form and php script, but insert doesn' t work. What is wrong in my insert mysql_query? mysql_query( "insert into obiskovalci (ime, priimek, ulica, hstevilka, pstevilka, posta) values('$im

[PHP-DB] Setting a timed-session

2004-10-01 Thread Philip Thompson
Hi all. This may be a bit elementary, however, I am confused on the functionality of it. I am wanting to create a session that logs out after a certain amount of time, no matter if the user is doing something or not. I have used the function `set_time_limit()`, but I don't know if I'm using it

Re: [PHP-DB] ip address

2004-09-30 Thread Philip Thompson
Ramil, On Sep 30, 2004, at 1:17 AM, Ramil Sagum wrote: On Thu, 30 Sep 2004 11:00:35 +0530, balwantsingh <[EMAIL PROTECTED]> wrote: i tried the $_SERVER['REMOTE_ADDR'] it is giving ip address of server which is hosting the webpage not the user's ip address. pls. suggest how can IP address of an

Re: [PHP-DB] ip address

2004-09-29 Thread Philip Thompson
['REMOTE_ADDR'] it is giving ip address of server which is hosting the webpage not the user's ip address. pls. suggest how can IP address of an user can be obtained. with best wishes balwant -Original Message----- From: Philip Thompson [mailto:[EMAIL PROTECTED] Sent: Thursday, Septembe

[PHP-DB] Re: getenv() alternative

2004-09-29 Thread Philip Thompson
Oh, before I get a slew of emails about this one, I think I figured it out: $_SERVER['REMOTE_ADDR'] I knew it couldn't have been that difficult... brain fart! Sorry for wasting your time. ~Philip On Sep 29, 2004, at 5:02 PM, Philip Thompson wrote: Hi all. I am needing to obtain

[PHP-DB] getenv() alternative

2004-09-29 Thread Philip Thompson
Hi all. I am needing to obtain the IP address of a user who logs into the system. I tried to use `getenv("REMOTE_ADDR")`, however, this function does not work in ISAPI mode, which is what I am running. Is there an alternative to obtaining the IP address? I have looked around, but I cannot seem

Re: [PHP-DB] Using sessions to gather visitor information

2004-09-15 Thread Philip Thompson
Hi. On Sep 15, 2004, at 6:55 AM, Vincent Jordan wrote: I am trying to track the users that visit one page on a site. I am having a couple of problems. The time seems to be 5 hours off. I do not have any tables as of yet what I would like to do is only count an ip address as one in a 24 hour perio

Re: [PHP-DB] mysq query without subselects

2004-09-13 Thread Philip Thompson
Blackwater, On Sep 10, 2004, at 12:39 PM, blackwater dev wrote: Hello, I need to grab the max value of all of the data in a table grabbing the max total for each client. Example. T1 idtotal clientid 1 100 111 2 200 111 3 100 112

Re: [PHP-DB] Insert Query PROBLEMS

2004-09-13 Thread Philip Thompson
Aaron, I agree with what Mark said. But I just want to say what I noticed off hand... On Sep 10, 2004, at 11:13 AM, Aaron Todd wrote: I'm trying to run an INSERT query on my mysql database and it isnt working. Here is the query: $updatequery = "UPDATE `users` SET ('c

Re: [PHP-DB] Please help

2004-09-10 Thread Philip Thompson
I think everyone knows that $sql is a statement. But what people are asking is: what is that statement?! Because if there are "incorrect" characters or 's in that statement, then that can break your code/statement. ~Philip On Sep 9, 2004, at 5:49 PM, Stuart Felenstein wrote: Just getting back t

Re: [PHP-DB] functions via event handlers

2004-09-06 Thread Philip Thompson
Yemi, On Sep 6, 2004, at 7:14 AM, Yemi Obembe wrote: i'd just luv to ask if it is possibble to call a function in PHP by using event handlers (like onmouseover, onload) as done in javascript? if its possible, i'd appreciate someone to tutor me on it. As far as I know, this is not possible. Since

Re: [PHP-DB] Re: Passing variables from HTML to PHP

2004-08-31 Thread Philip Thompson
p://www.Velocity7.com/ <<------ "Philip Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all. This might be a simple answer, but I'm still not sure what the case is. Okay, so I have a in my ht

[PHP-DB] Passing variables from HTML to PHP

2004-08-31 Thread Philip Thompson
Hi all. This might be a simple answer, but I'm still not sure what the case is. Okay, so I have a in my html that has some s. These each have a `name` and a `value` attribute to them, of course. I cannot seem to access the name/value pair in my php without using the $_POST method/variable name

Re: [PHP-DB] Webpage response to selection & $_POST

2004-08-30 Thread Philip Thompson
Do you recommend I use an array over a lot of variables? I can use either or - there was no particular reason why I chose a single variable. Thanks, ~Philip On Mon, 2004-08-30 at 11:02 -0500, Philip Thompson wrote: Peter, On Aug 29, 2004, at 6:26 PM, Peter Lovatt wrote: Hi you need to check fo

[PHP-DB] Webpage response to selection & $_POST

2004-08-29 Thread Philip Thompson
Hi all. I have a list of users in a database that I would like to show on a dynamic webpage. With each of these users that shows up on the page, there is going to be a checkbox next to their name so that I can perform multiple tasks, such as 'Remove User' or 'Modify Information'. I have all of

Re: [PHP-DB] sendmail

2004-08-02 Thread Philip Thompson
Aaron, On Aug 2, 2004, at 1:31 PM, Aaron Todd wrote: So far, I have been doing ok with PHP. I feel that I have picked it up rather easily. But now I need some help. I am trying to use the sendmail functions to send data entered in a form to my email address. Currently its not working at all.

[PHP-DB] Enabling LDAP support

2004-08-02 Thread Philip Thompson
Hi again all. Sorry to bug you again. But I thought I would throw this out here again and see if anyone has any input. It would be greatly appreciated. I am running PHP on a Windows 2000 Server, and I need to enable LDAP support. So I have viewed the

[PHP-DB] Enabling LDAP support on Win2k Server

2004-07-30 Thread Philip Thompson
Hi all. I am running PHP on a Windows 2000 Server, and I need to enable LDAP support. So I have viewed the page on how to get LDAP running. However, I have run into a snag. I have copied the two required .dlls (libeay32 & ssleay32) into the system fo

Re: [PHP-DB] Empty query result

2004-07-26 Thread Philip Thompson
Thanks all! I will try some of the suggestions that you guys gave. I appreciate it. ~Philip On Jul 26, 2004, at 12:52 PM, Pablo M. Rivas wrote: Hello Philip, read: http://www.php.net/manual/en/function.mysql-result.php when you do $queryResult = mysql_result($queryResult,0) you

Re: [PHP-DB] Empty query result

2004-07-26 Thread Philip Thompson
Pablo, Hello Philip, pse.. can you paste the error information? There is no known "empty set" problem. Here's my function: function getMysqlSelectResultForUsername($identifier, $userName, $link) { $queryResult = mysql_query("select $identifier from theTable where username = '$userName'

[PHP-DB] Empty query result

2004-07-26 Thread Philip Thompson
Hi all. I am querying a database of single information multiple times using a simple 'select' statement. However, whenever the data in the DB is empty or is 0 (zero), then it throws an error. However, I don't want it to throw an error, I just want it to move on to the next query. This is being

Re: [PHP-DB] Re: problem....

2004-06-23 Thread Philip Thompson
I may be incorrect, but I do not think that by "redefining" the variable $pic is destroying its old contents. If you are familiar with how programming works, you realize that the "stuff" on the right side of the "=" sign is evaluated first, and then assigned to the left side of the "=" sign. Be

Re: [PHP-DB] value error in PHP form

2004-06-21 Thread Philip Thompson
Hi. You left out the 'php' after the ' See if that helps any. ~Philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: Erroneous date and time

2004-06-16 Thread Philip Thompson
Have you tried with "a" insted of "A" for am/pm indication? Yes, I have tried both 'a' and 'A'. Still gives an incorrect time. ~Philip Hope can help Bye Franciccio "Philip Thompson" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EM

Re: [PHP-DB] delete a record not working

2004-06-16 Thread Philip Thompson
Yeah, you should have a single apostrophe around the $id. So it should read: mysql_query("DELETE FROM open_trades WHERE id='$id'"); That should do it. ~Philip On Jun 16, 2004, at 12:04 AM, Justin wrote: Hello, I have a simple script to retrieve and then delete a selected script, but it does not

[PHP-DB] Erroneous date and time

2004-06-15 Thread Philip Thompson
Hi all. Maybe there's something I'm doing incorrectly, but I cannot get the date() function to return the appropriate time. It's always 12 hours off. I've tried using 24-hour time and 12-hour time (with AM/PM), but they both give the wrong time. I even emailed the server admin to make sure that

Fwd: [PHP-DB] anonymous select error

2004-06-15 Thread Philip Thompson
I agree about the semi-colon: not allowed. But also, specify '$link' in your mysql_error(). This tells it explicitly what the error is referring to, even though it should be able to figure it out on it's own. echo 'MySQL Error: ' . mysql_error($link); Hope this helps - seems to work for me. ~Ph

Re: [PHP-DB] Re: mysql results, arrays, and for loops

2004-06-11 Thread Philip Thompson
Yes, thanks to all that assisted. I got it working like a charm! ~Philip On Jun 11, 2004, at 9:30 AM, Torsten Roehr wrote: "Philip Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all! I am using a select statement to obtain all the dates whenever som

[PHP-DB] mysql results, arrays, and for loops

2004-06-11 Thread Philip Thompson
Hi all! I am using a select statement to obtain all the dates whenever someone submitted a problem in a database. Well, I want to get the result (which could be multiple dates) and then print that in a table format with some other information on a webpage. So I want to use a FOR loops and go th

Re: [PHP-DB] Re: HTTP header information

2004-06-10 Thread Philip Thompson
On Jun 10, 2004, at 9:44 AM, Torsten Roehr wrote: "Philip Thompson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi all. I am running a website to where a user needs to login to authenticate themselves to perform certain tasks. So a user logs in, and I start a ses

[PHP-DB] HTTP header information

2004-06-10 Thread Philip Thompson
Hi all. I am running a website to where a user needs to login to authenticate themselves to perform certain tasks. So a user logs in, and I start a session (in PHP, of course). Well, the catch is, I am doing this all from one page, 'viewer.php', and I just tack on the specific view/page that I