Re: [PHP-DB] PHP MySQL Issue!

2007-07-13 Thread Dwight Altman
On Jul 12, 2007, at 9:50 PM, Austin C wrote: Hello, I dont get any errors. Just a blank page. But, I go to the database, and it did what I told it to with the header table, but not with the circulation table. Check your error log or add this as the first line in your script.

Re: [PHP-DB] PHP MySQL Issue!

2007-07-13 Thread Dwight Altman
On Jul 12, 2007, at 9:50 PM, Austin C wrote: Hello, I dont get any errors. Just a blank page. But, I go to the database, and it did what I told it to with the header table, but not with the circulation table. After you built the SQL for the circulation table, you did not execute it [with

RE: [PHP-DB] Re: MySQL 0 index date and time functions (mode or typo)?

2007-05-18 Thread Dwight Altman
with a Monday in this year -- itoctopus - http://www.itoctopus.com Dwight Altman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] In MySQL, regardless of the documentation version, http://dev.mysql.com/doc/refman/4.1/en/date-and-time- functions.html#function _week I've seen

[PHP-DB] MySQL 0 index date and time functions (mode or typo)?

2007-05-16 Thread Dwight Altman
In MySQL, regardless of the documentation version, http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html#function _week I've seen the explanation for receiving a 0 from the WEEK function depending on the mode setting which causes a range between 0-53. But what about: DAYOFMONTH 0 to

RE: [PHP-DB] MySQL Query on the Fly

2007-05-14 Thread Dwight Altman
That's one of the uses of Ajax. http://www.xajaxproject.org/ http://wiki.xajaxproject.org/Tutorials:Learn_xajax_in_10_Minutes You don't have to use an iframe. Regards, Dwight -Original Message- From: Todd A. Dorschner [mailto:[EMAIL PROTECTED] Sent: Friday, May 11, 2007 8:31 AM

RE: [PHP-DB] error logging MySQL syntax errors?

2007-04-27 Thread Dwight Altman
In case echo mysql_error(); gives you exactly what the browser gave you, what you need to be doing is echo'ing your SQL statement and checking if that statement is correct. Try your SQL statement in a query tool like phpmyadmin, but that still may say your syntax is wrong. Regards, Dwight

RE: [PHP-DB] SELECT string

2007-04-24 Thread Dwight Altman
Businesses -- id businessName isChristianBookstore isGift isHomeDecor isSkinCareAndCosmetics isThriftStore CREATE TABLE `Businesses` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `businessName` VARCHAR( 64 ) NOT NULL , `isChristianBookstore` TINYINT( 1 ) NOT NULL , `isGift` TINYINT( 1 ) NOT

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
http://php.he.net/manual/en/function.pcntl-fork.php says 'The reason for the MySQL Lost Connection during query...' like what you concluded, although they grab a new $db connection in the first for loop } else if ( $pid ) { I bet a child closes the one you create after the for loop while the

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
Actually I suppose you need to loop with foreach to wait on all children before attempting any $db-execute, then after your foreach loop, get your $db and execute. Regards, Dwight -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED] Sent: Monday, April 23, 2007 10:09 AM

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
:01 PM To: Dwight Altman; php-db@lists.php.net Subject: Re: [PHP-DB] Forking and database connections Hey Dwight, Thanks for the replies! When the first child thread closes, all of the DB connections seem to close. That is, the $db-execute() statements will fail in the child threads

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
To use a PEAR::DB persistent connection, try $db = DB::connect($dsn, TRUE); or $db = DB::connect($dsn, true); Googled for pear::db persistent connection and got http://vulcanonet.com/soft/?pack=pear_tut Regards, Dwight -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED

RE: [PHP-DB] Forking and database connections

2007-04-23 Thread Dwight Altman
Glad to help. I was actually interested in your post because of forking versus threading. I still haven't found anything except for PHP-GTK but it may help your database related performance if it is added/exists in PHP. Regards, Dwight -Original Message- From: Chris Verges

RE: [PHP-DB] Determine AuthMySQL* directives in script?

2007-04-20 Thread Dwight Altman
, April 19, 2007 7:20 PM To: Dwight Altman Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Determine AuthMySQL* directives in script? Dwight Altman wrote: I only agree to it depending if I have to write my own function using a regular expression to parse the .htaccess file, but I was wondering

RE: [PHP-DB] Determine AuthMySQL* directives in script?

2007-04-20 Thread Dwight Altman
, Dwight -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED] Sent: Friday, April 20, 2007 9:32 AM To: php-db@lists.php.net Subject: RE: [PHP-DB] Determine AuthMySQL* directives in script? Cool alternative. We don't write .htaccess files like that though. Anyway, I

RE: [PHP-DB] Determine AuthMySQL* directives in script?

2007-04-19 Thread Dwight Altman
- From: Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 18, 2007 7:28 PM To: Dwight Altman Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Determine AuthMySQL* directives in script? Dwight Altman wrote: Is there an existing way via a function or variable to determine Apache

[PHP-DB] Determine AuthMySQL* directives in script?

2007-04-18 Thread Dwight Altman
Is there an existing way via a function or variable to determine Apache mod_auth_mysql directives (specifically AuthMySQLDB) in use for the current script? On our servers, some directories use a basic .htaccess file while some use a database under mod_auth_mysql while the latest user management

RE: [PHP-DB] PHP_AUTH_USER .htaccess

2007-03-06 Thread Dwight Altman
Typo? $_SERVER['|PHP_AUTH_USER'] != $_SERVER['PHP_AUTH_USER'] Notice the pipe | before PHP_AUTH_USER? Regards, Dwight -Original Message- From: Mike van Hoof [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 2:03 AM To: php-db@lists.php.net Subject: [PHP-DB] PHP_AUTH_USER

[PHP-DB] PLEASE UNSUBSCRIBE at mockandmore.de from php-db@lists.php.net -- FW: Unbekannter Empfaenger - Unknown recipient.

2007-03-06 Thread Dwight Altman
Is there any way to get at mockandmore.de unsubscribed? I sent to php-db@lists.php.net which is not moderated. Regards, Dwight -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 10:04 AM To: was_my_email_address Subject: Unbekannter

RE: [PHP-DB] Fatal Error: Class 'mysqli' not found in...

2007-02-19 Thread Dwight Altman
So we are talking about MS Windows? I was shocked to see Linux antivirus offerings, so you had me concerned for a moment. I can only laugh at your calamity. Okay, I can offer something else. How about providing the list with the not found in... part? Perhaps put it where it is looking for it?

RE: [PHP-DB] Where am I doing wrong - DB

2006-11-28 Thread Dwight Altman
Assuming $submit even has a value (Are you sure you don't mean $_POST['something'] here?) all your code does is test 2 variables, connect to the server, change to a database and set some more few variables. When do you plan to execute a query mysql_query($sql), or output a print or echo of some

RE: [PHP-DB] RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small)

2006-11-07 Thread Dwight Altman
You have while($row=pg_fetch_array($result,NULL,PGSQL_ASSOC)) { What's with the NULL ? row Row number in result to fetch. Rows are numbered from 0 upwards. If omitted, next row is fetched. BUT you are requesting the NULL row? Why not just use while($row=pg_fetch_assoc($result)) { Regards,

RE: [PHP-DB] SQL query

2006-09-28 Thread Dwight Altman
Check your version. Subselects were only added in MySQL Version 4.1. Regards, Dwight -Original Message- From: Edwin Cruz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 28, 2006 10:53 AM To: 'Miguel Guirao'; php-db@lists.php.net Subject: RE: [PHP-DB] SQL query Make sure that

RE: [PHP-DB] Only a section from the database result

2006-07-18 Thread Dwight Altman
substr Regards, Dwight -Original Message- From: Benjamin Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:25 PM To: PHP DB Subject: [PHP-DB] Only a section from the database result I have articles in a MySQL database and I want creating a fast brows where people

RE: [PHP-DB] Only a section from the database result

2006-07-18 Thread Dwight Altman
echo p . substr($row['pagetext'], 0, 50) . /p; Regards, Dwight -Original Message- From: Benjamin Adams [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:25 PM To: PHP DB Subject: [PHP-DB] Only a section from the database result I have articles in a MySQL database and I

RE: [PHP-DB] Submitting form from a href

2006-07-17 Thread Dwight Altman
I don't think so, because the OP needs other form fields submitted as well. Regards, Dwight -Original Message- From: Sean Mumford [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 9:24 AM To: 'Php-Db' Subject: RE: [PHP-DB] Submitting form from a href Couldn't you achieve the

RE: [PHP-DB] running program after insert w/MySQL 4.1

2006-07-07 Thread Dwight Altman
If you can make Access execute a shell function, maybe you can use cURL or wget to signal a web PHP script to run (and/or run the PHP program -- if it is not accessible through a URL). Regards, Dwight -Original Message- From: bill [mailto:[EMAIL PROTECTED] Sent: Friday, July 07, 2006

RE: [PHP-DB] LIMIT

2006-07-05 Thread Dwight Altman
? Either way, it might be worth checking which is faster for your application. Regards, Dwight -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 05, 2006 9:53 AM To: 'php-db@lists.php.net' Subject: RE: [PHP-DB] LIMIT So how do I get

RE: [PHP-DB] LIMIT

2006-07-05 Thread Dwight Altman
* FROM aTable LIMIT 5 SELECT FOUND_ROWS() It's in the mysql documentation under SELECT syntax I believe. Chris Dwight Altman wrote: Is there a way to get the number of rows that would have been returned had there not been a LIMIT clause in a SELECT statement? For example, if Query

RE: [PHP-DB] LIMIT

2006-06-30 Thread Dwight Altman
there was a LIMIT clause]. Something like mysql_info. Regards, Dwight x2407 -Original Message- From: Frank M. Kromann [mailto:[EMAIL PROTECTED] Sent: Thursday, June 29, 2006 5:46 PM To: Dwight Altman Cc: php-db@lists.php.net Subject: Re: [PHP-DB] LIMIT What about 'select count(*) from

[PHP-DB] LIMIT

2006-06-29 Thread Dwight Altman
Is there a way to get the number of rows that would have been returned had there not been a LIMIT clause in a SELECT statement? For example, if Query #1) SELECT * FROM aTable would normally return 100 rows. But Query #2) SELECT * FROM aTable LIMIT 5 will return 5 rows. Is there a way to find

RE: [PHP-DB] Conditional updating...

2006-06-26 Thread Dwight Altman
I use: $sql .= `first_name` = ' . $first_name . ', ; in the if statements. Notice the angled tick marks and single tick marks. Then before executing the query, remove the last , . $sql = substr($sql, 0, -2); In your case, before you append the WHERE clause. You should echo out your built-up

RE: [PHP-DB] how to get the referrer page details

2006-06-16 Thread Dwight Altman
I use $_SERVER['REMOTE_ADDR'], but the notes at http://us2.php.net/getenv say you may want to also use HTTP_X_FORWARDED_FOR (and not even getenv but $_SERVER as you were attempting). Regards, Dwight -Original Message- From: Oliver Block [mailto:[EMAIL PROTECTED] Sent: Friday, June

RE: [PHP-DB] Sending filing attachments using PHP

2006-05-12 Thread Dwight Altman
Right after rebuilding php and apache and breaking PHP funtionality for everyone, just so you can send a semi complex MIME message? That is the epitome of PHP's lameness and why I can't sit quietly by and not recommend an easy to install and use and maintain solution. This command breaks

RE: [PHP-DB] Bad picture colors

2006-04-27 Thread Dwight Altman
Could it be related to quality in JPEG lossy compression? Can you try PNG instead? -Original Message- From: nikos [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 11:28 AM To: PHP-mailist (PHP-mailist) Subject: [PHP-DB] Bad picture colors Hello list I use the following code to

RE: [PHP-DB] Bad picture colors

2006-04-27 Thread Dwight Altman
you _ Γατσής Νίκος - Gatsis Nikos Web developer tel.: 2108256721 - 2108256722 fax: 2108256712 email: [EMAIL PROTECTED] http://www.qbit.gr -Original Message- From: Dwight Altman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 27, 2006 7:41 PM To: 'nikos'; 'PHP-mailist (PHP

RE: [PHP-DB] grabbing data and auto email set users

2006-04-10 Thread Dwight Altman
How about: $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { instead of your line 6 and 7? And why are you going back to db_query on line 9 instead of staying with mysql_query? Also, you might want to check $num_rows = mysql_num_rows($result); instead of line 10

RE: [PHP-DB] Text file (rw) question...

2006-03-14 Thread Dwight Altman
How about posting your solution as well? Maybe someone will find it useful. -Original Message- From: Rob W. [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 2:07 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] Text file (rw) question... Nevermind. I figured it out. -

RE: [PHP-DB] Passwords

2006-03-10 Thread Dwight Altman
Sure, mysql.com and seasrch for crypt. Not sure why this is asked on a PHP list since it has nothing to do with PHP. b) every language has a crypt function Then I guess it's okay to have crypt questions/answers on every language list. -Original Message- From: JupiterHost.Net

RE: [PHP-DB] Database abuse help needed

2006-03-09 Thread Dwight Altman
If you POST from your form use $_POST, or $_GET for a form GET foreach($_POST as $key = $value){ if( strpos($value, $findme) !== false ){ //$findme was found in $value } } http://php.net/manual/en/reserved.variables.php

RE: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Dwight Altman
Put nl2br() around the field in the table that you saved newlines nl2br($row['theTableFieldWithTheNewlines']) maybe td align=left' . nl2br($row['task_usaction']) . '/td -Original Message- From: Jeff Broomall [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 10:34 AM To: Jeff

RE: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Dwight Altman
Like array(), this is not really a function, but a language construct. list() is used to assign a list of variables in one operation. http://php.he.net/manual/en/function.list.php Watch out for those language constructs which look to us like functions. Probably related to some folks preferring

RE: [PHP-DB] Strange rawlist behaviour

2006-02-07 Thread Dwight Altman
I didn't read all your code, but this jumped out to me also as to Bastien for ( $i = 1; $i count($array); $i++ ) { If you have 1 file, then you probably have 1 1 which does not execute even once. I definitely suggest also $i = 0; -Dwight -Original Message- From: Chris Payne

RE: [PHP-DB] Storing Credit Cards, Passwords, Securely, two-wayencryption

2006-01-09 Thread Dwight Altman
Did you actually SNIP the document[ation] how it can be done safely for all the world to see and learn! ??? Or are you saying go buy this book? -Original Message- From: Peter Beckman [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 10:54 PM To: Neil Smith [MVP, Digital media]

RE: [PHP-DB] Storing Credit Cards, Passwords, Securely,two-way encryption

2006-01-09 Thread Dwight Altman
Did you actually SNIP the document[ation] how it can be done safely for all the world to see and learn! ??? Or are you saying go buy this book? No, I retyped the passage in its entirety from the book. Learn to SNIP your posts ! Cheers - Neil -- Neil, Perhaps you replied directly to the

RE: [PHP-DB] Storing Credit Cards, Passwords, Securely,two-way encryption

2006-01-09 Thread Dwight Altman
Neil, Perhaps you replied directly to the thread starter. My bad. It was in Friday's batch or emails. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Re: IS_NUMERIC ? [SOLVED]

2005-11-29 Thread Dwight Altman
://php.belnet.be/manual/en/function.is-numeric.php Apparently there is :) Dwight Altman wrote: Hello List, Is there an IS_NUMERIC(aCandidateString) function in MySQL that I can run in a query, similar to the various PHP is_* functions? I can't seem to find it in the docs (other than

RE: [PHP-DB] [PDO] Number of rows found by Select

2005-11-08 Thread Dwight Altman
I suppose you could use count( PDOStatement::fetchAll() ), but I understand your amazement. mysql_num_rows() is specific to MySQL. He wants a PDO version. -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 10:51 AM To: php-db@lists.php.net

Re: [PHP-DB] SELECT Performance and INDEXing

2005-08-18 Thread Dwight Altman
- From: Dwight Altman [EMAIL PROTECTED] To: php-db@lists.php.net Sent: Wednesday, August 10, 2005 4:23 PM Subject: [PHP-DB] SELECT Performance and INDEXing I have a MyISAM table holding images with field types bigint(20), mediumblob, varchar(255), blob and tinyint(3). The table has grown

Re: [PHP-DB] SELECT Performance and INDEXing

2005-08-18 Thread Dwight Altman
statement and post the results? -Micah On Thursday 18 August 2005 1:02 pm, Dwight Altman wrote: Hey, this is my first question. So if you could just reply to say it reached the php-db list, that would be terrific. Of course, answering the questions would be awesome as well. I meant

Re: [PHP-DB] SELECT Performance and INDEXing

2005-08-18 Thread Dwight Altman
an index on field1 and field2 if you don't already, as that may help. (sometimes it doesn't, depending on data type) I hope that helps, -Micah On Thursday 18 August 2005 4:30 pm, Dwight Altman wrote: Thanks for your reply. Here are the results of EXPLAIN: EXPLAIN SELECT field1, field2

[PHP-DB] SELECT Performance and INDEXing

2005-08-10 Thread Dwight Altman
I have a MyISAM table holding images with field types bigint(20), mediumblob, varchar(255), blob and tinyint(3). The table has grown to over 800 MB and over 6,000 rows. In the past week, performance has been about 15-20 seconds to run the following select statement which pulls only 16 maximum

Re: [PHP-DB] SELECT Performance and INDEXing

2005-08-10 Thread Dwight Altman
I meant 'Analyze table' and 'the composite key field2 field3 would be unique' - Original Message - From: Dwight Altman [EMAIL PROTECTED] To: php-db@lists.php.net Sent: Wednesday, August 10, 2005 4:23 PM Subject: [PHP-DB] SELECT Performance and INDEXing I have a MyISAM table holding

Re: [PHP-DB] Re: UPDATE command

2005-06-20 Thread Dwight Altman
This is kind of interesting ... $query=SELECT * FROM quiettimequotation WHERE used = 0 ORDER BY RAND() LIMIT 1; works; $query=SELECT * FROM bibleverses WHERE 'used' = 0 ORDER BY RAND() LIMIT 1; doesn't! Having the ' around used makes that select command fail --- but the UPDATE command