RE: [PHP-DB] Corrupted query results in memory.

2007-11-09 Thread Instruct ICC
> This morning I figured out how to > replicate the issue. Issue a double request for the mysql result set. > Due to the "Ajaxy" nature of my web app it isn't the same as a double > HTTPRequest of POST, as it is requesting a result set back from the > database twice in a row before the response is

RE: [PHP-DB] mysql data truncation does not cause an error to be thrown

2007-11-08 Thread Instruct ICC
Maybe tell the list the exact solution? File/variable/setting? Cheers. > I figured it out > > it was the mysql install not php :-) > cheers for your help though :-) > > Vandegrift, Ken wrote: > > You may want to check the my.ini setting for the table type you are > > using and see if there i

RE: [PHP-DB] mysql data truncation does not cause an error to be thrown

2007-11-08 Thread Instruct ICC
field against the entry data and > javascript myself out of trouble but i was more worried that there is no > error or message when mysql clearly returns one saying i've truncated > this yet php ignores it completely. It should fail or know about the > truncation at least ! > Cheers f

RE: [PHP-DB] mysql data truncation does not cause an error to be thrown

2007-11-08 Thread Instruct ICC
> Using mysql_query if i try to force more data than a field can have the > data is truncated yet no error is throw at all. > Is there a way round this ? > Cheers > > Andy This isn't exactly what you want to hear, but how about validating your input before submitting a query?

RE: [PHP-DB] Phpmailer sending duplicate messages...

2007-11-01 Thread Instruct ICC
> Stut and Instruct > > Just found this which clears the email after each loop. > > $mail->ClearAddresses(); > > Thanks for you input. Good find. Now the list can benefit. _ Climb to the top of the charts!  Play Star Shuffle:  t

[PHP-DB] RE: inserting history after sending phpmailer message

2007-11-01 Thread Instruct ICC
> So the following code is now sending one email to each recipient but now > that'd I've added the insert statement at the bottom it only sends one email > and one history and I get the following error message" > > Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, > boolean g

RE: [PHP-DB] Phpmailer sending duplicate messages...

2007-11-01 Thread Instruct ICC
> You're re-using the same message each time around the loop. Each time > you call AddAddress you're, erm, adding another address. You either need > to reset the recipients or reset the message each time round the loop > (I'm not familiar with Phpmailer so I have no idea how to do this). > > -

RE: [PHP-DB] Phpmailer sending duplicate messages...

2007-11-01 Thread Instruct ICC
> while($row = mysqli_fetch_assoc($result)) > { > extract($row); > > $mail->IsSMTP(); > $mail->Host = "host.com"; > $mail->From = "[EMAIL PROTECTED]"; > > $mail->From = "[EMAIL PROTECTED]"; > $mail->FromName = "Company"; > $mail->AddAddress("$email", "$Contact"); > >

[PHP-DB] Cumulative DATEDIFFs and JOINs

2007-10-26 Thread Instruct ICC
I have a table to track when a project has reached a certain state, structured like so: id projectId timeStamp state Say: Project1 on 2007-09-01 is at state "started" Project2 on 2007-10-01 is at state "started" Project3 on 2007-10-15 is at state "started" Project1 on 2007-10-20 is at state "co

RE: [PHP-DB] ER Diagramming tool for MySQL

2007-10-22 Thread Instruct ICC
Maybe we should keep top posting for consistency in this particular thread? Case Studio 2 does not appear to be free. Toad seems to be Windows only and no ER Diagramming? I use dbdesigner, but manually draw the relations (I believe this is since MySQL <= 3.23.58; MySQL <= 4.0.17 did not have re

RE: [PHP-DB] mssql_connect not working from command line [RESOLVED]

2007-10-19 Thread Instruct ICC
Thanks for informing me that CGI and CLI may use a different php.ini and that they may be compiled differently. The admin finally admitted that he ran a yum update which overwrote the manually compiled CLI version. The reason I missed it was that the build date of the latest CLI version was e

RE: [PHP-DB] Special chars & UTF-8: sometimes ok, sometimes wrong

2007-10-18 Thread Instruct ICC
> Hi. > > Working with PHP 4.4 and mySQL 4.1, I've got some texts stored in a > UTF-8 table with special chars. > > I serve a UTF-8 header within my HTML, Apache is configured to serve > UTF-8 and PHP scripts are saved in UTF-8 charset. > > However, sometimes I get 'España' and other times 'Espa�a

RE: [PHP-DB] php maximum characters in text field

2007-10-17 Thread Instruct ICC
> Does anyone know how to look for a "Curly quote" or "typographer's quotation > mark". They are being submitted on our form under customer description. I > have created a function that replaces a regular straight quotation mark > ($title = str_replace("'", "", $title);), but do not know what t

RE: [PHP-DB] php maximum characters in text field

2007-10-15 Thread Instruct ICC
Do you see those apostrophes in that text? They need to be properly escaped. > Date: Mon, 15 Oct 2007 15:09:52 -0400 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-db@lists.php.net > Subject: RE: [PHP-DB] php maximum characters in text field > > Here is the exact text

RE: [PHP-DB] php maximum characters in text field

2007-10-15 Thread Instruct ICC
> I am starting to believe it is NOT the character length that is causing the > problem. We have received other orders with more in it than that, and they > came in ok. I think there may be something in the input that php does not > like. I've been searching for code that will "clean up" input,

RE: [PHP-DB] php maximum characters in text field

2007-10-15 Thread Instruct ICC
> >varchar maxs out at 255 characters > just for clarification, mysql varchar easily can hold more than 255 > characters > (I remember it was the case in ancient 3.x times) > only if one wants to store newlines he must use type "text" > > just my 2 cent News to me, so I check the docs. http://

RE: [PHP-DB] FW: Kesalahan posting: Don Komo

2007-10-12 Thread Instruct ICC
Date: Fri, 12 Oct 2007 11:29:27 -0400 From: [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] FW: Kesalahan posting: Don Komo Why do I get this everytime I post? I think Don Komo registered to this PHP list with the private email address [EMAIL PROTECTED] So since we are not a mem

RE: [PHP-DB] Remote DB Connection: Pros and Cons?

2007-10-11 Thread Instruct ICC
> Have any of you tried running a PHP website using a remote database > connection? Yes. If you mean the web server is on 1 box and the database server is on a 2nd box. > We currently have an in-house PHP website driven by a PostgreSQL database > that is HEAVILY administered within the office

RE: [PHP-DB] Data not fetching in the textfield.

2007-09-26 Thread Instruct ICC
> Date: Wed, 26 Sep 2007 09:33:40 -0700 > From: [EMAIL PROTECTED] > echo(" value=$rows[0]>"); If what you want rendered in html should have quotes like so: Double quote the value like so: echo(""); and escape $rows[0] in case it contains any double quotes thusly (or with

RE: [PHP-DB] Pages not fully loading

2007-09-24 Thread Instruct ICC
> Date: Fri, 21 Sep 2007 23:42:40 +0100 > From: [EMAIL PROTECTED] > I have tried putting print ("test line x") throughout the script, which > just showed me it was failing sometimes before the mail function, but > not always, sometimes in the middle of a loop to create a select box it > just st

RE: [PHP-DB] Pages not fully loading

2007-09-21 Thread Instruct ICC
This new hotmail has really screwed up the formatting, sorry. I have seen where errors were not displayed on a PHP production server, so I would get a blank screen. Check the web server error logs as was suggested. Also try to display all errors just for testing: http://php.net/error_reportin

RE: [PHP-DB] Executing a query in the future

2007-09-13 Thread Instruct ICC
From: "Mark Bomgardner" <[EMAIL PROTECTED]> Is there something that can run in the background that can run a page at varying intervals? markb Unix/Mac/Linux: cron Windows: task scheduler _ Kick back and relax with hot games and c

Re: [PHP-DB] mssql_connect not working from command line

2007-09-13 Thread Instruct ICC
From: Chris <[EMAIL PROTECTED]> Instruct ICC wrote: You said something about 2 different configuration files. I'm just making up this name, but do you have something like: CLI_Configuration File (php.ini) Path => /etc/cli_php.ini as well as: Configuration File (php.ini) Path =

Re: [PHP-DB] mssql_connect not working from command line

2007-09-12 Thread Instruct ICC
From: Chris <[EMAIL PROTECTED]> Instruct ICC wrote: Both your command php -i | grep 'php.ini' and find / -name php.ini 2>/dev/null report the single /etc/php.ini Hmm. do a php -i and look for: Configuration File (php.ini) Path => That will tell you where it's l

Re: [PHP-DB] mssql_connect not working from command line

2007-09-11 Thread Instruct ICC
However, a web page that includes the same file with the mssql_connect call still works fine, and now it makes sense that I see mssql is still enabled in phpinfo. The apache version of the php.ini file is different to the cli version. Make sure you are looking at the right one. On debian I h

[PHP-DB] mssql_connect not working from command line

2007-09-10 Thread Instruct ICC
I had cronjobs running fine on Linux which included a file which called mssql_connect. Today when I run the cronjob script directly from the command line, I get: PHP Fatal error: Call to undefined function mssql_connect() in /the/included/file.php on line # Fatal error: Call to undefined fun

Re: [PHP-DB] date problems

2007-09-07 Thread Instruct ICC
From: "Instruct ICC" <[EMAIL PROTECTED]> And while not trusting your indexing, rewrite short_date as: My short_date rewrite was also wrong. So it looks like you will have to learn those offsets for this function if you do it on the PHP side. But you could also do it o

Re: [PHP-DB] date problems

2007-09-07 Thread Instruct ICC
From: rDubya <[EMAIL PROTECTED]> Thanks for the help so far guys!! Not helping though. I have the date contained in the database as timestamp (-MM-DD HH:MM:SS). Do you really need to pull events from the database which are not in your range of interest? This will only slow down your pro

RE: [PHP-DB] date problems

2007-09-06 Thread Instruct ICC
From: rDubya <[EMAIL PROTECTED]> My problem is that I have events dated for Sep 2007 and on, and yet they all come up as being on Dec 7 to 9, 2006.. any ideas? rDubya How about having MySQL only return the events you are interested in? SELECT yourEventFields FROM theTable WHERE TO_DAYS( theEv

RE: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL

2007-08-27 Thread Instruct ICC
"I don't see a constructor for mysqli at http://php.net/mysqli"; My bad. It's right there at the top. Must be a case of the Mooondayz. _ Now you can see trouble…before he arrives http://newlivehotmail.com/?ocid=TXT_TAGHM_migratio

RE: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL

2007-08-27 Thread Instruct ICC
From a php-general thread earlier: generates: Fatal error: Call to undefined function new mysqli() in index.php on line 24 while '; ?> generates success: conn good: Object id #1 :very good indeed The book I'm working with (PHP & MySQL Web Dev, Welling/Thompson) specifically d

RE: [PHP-DB] Spam Post Defense / ID spam form posts

2007-08-23 Thread Instruct ICC
Sorry, wrong list (although I'm tracking them in a DB). Advice appreciated... _ Learn.Laugh.Share. Reallivemoms is right place! http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us -- PHP Database Mailing List (http://www.php.net/)

[PHP-DB] Spam Post Defense / ID spam form posts

2007-08-23 Thread Instruct ICC
Can server1 receive a web page form post from remoteAttacker, identify it as spam (or a DoS or DDoS attack), hand off the socket to multiple threads on multiple servers owned by server1's owner, return multiple responses to remoteAttacker which normally would have been a single response returned

RE: [PHP-DB] Friday losing it: JOINS

2007-07-20 Thread Instruct ICC
From: "Instruct ICC" <[EMAIL PROTECTED]> After a quick break in the john, I'm thinking perhaps table2 is not holding unique "part"s as I was told it would. Sanity restored. This is the case. _

[PHP-DB] Friday losing it: JOINS

2007-07-20 Thread Instruct ICC
I have a 1 table query which returns less rows than when I have a 2 table query using an implicit inner join or an explicit left join. Select some, fields From table1 Where part like '123%' /* returns 2225 rows */ Select activePart, some, fields From table1, table2 Where part like '123%' an

Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Instruct ICC
$db = dbase_open("c:\\Przewozy\\BAZY\\Ceny.dbf", 0); Or if you can map the drive, then you should be able to use a path like above using the mapped drive or \\server\volume\path\test.dbf Can you call up the file in Windows Explorer? ___

Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Instruct ICC
Becouse I wont read files, exactly *.dbf, from local machine, not from server. I have no problem with read or changing directory, if database is located on server. Thanks for any suggestion. So you are running PHP on your local machine "localhost" which happens to be a Windows machine, and als

Re: [PHP-DB] DBF + PHP

2007-07-19 Thread Instruct ICC
From: "Luke" <[EMAIL PROTECTED]> echo getcwd() . "\n"; chdir('c:\\temp'); echo getcwd() . "\n"; chdir('c:\\Przewozy\\BAZY'); echo getcwd() . "\n"; $db = dbase_open("c:\\Przewozy\\BAZY\\Ceny.dbf", 0); Just a quick guess/suggestion: Single tick quotes ' are taken literally and double tick quot

[PHP-DB] RE: Best Practices? [PHP-DB] Queries from two databases

2007-07-19 Thread Instruct ICC
From: Joaquín <[EMAIL PROTECTED]> I need query tables that are in two different databases mysql_select_db("DB1", $conn_1); mysql_select_db("DB2", $conn_2); $result_t1 = mysql_query("SELECT * FROM `Table1inDB1`",$conn_1); $row_t1 = mysql_fetch_assoc($result_t1); $result_t2 = mysql_query("SELECT

RE: [PHP-DB] MySQL user anHTACCESSusername not found?

2007-07-17 Thread Instruct ICC
From: "Instruct ICC" <[EMAIL PROTECTED]> Why is this second log entry present? I don't see any place where I ask MySQL to authenticate an HTACCESS username. It came to me. The very fact that we are using mod_auth_mysql in the Apache web server means that Apache is t

[PHP-DB] MySQL user anHTACCESSusername not found?

2007-07-13 Thread Instruct ICC
In my apache web server error log, I see the following: [Fri Jul 13 11:19:55 2007] [error] [client an.ip.addr.ess] MySQL ERROR: Can't connect to MySQL server on 'mysql.server.ip.address' (110) [Fri Jul 13 11:19:55 2007] [error] [client an.ip.addr.ess] MySQL user anHTACCESSusername not found: /p