Re: [PHP-DB] Long running db queries and the STOP button

2005-11-01 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi Jochem, if you are using apache then virtual() might offer a solution? (just guessing) Cool, I didn't know of that one. But it seems that is just calls back into apache, i.e. it doesn't generate a second independent thread. This would have been too good to be

Re: [PHP-DB] Long running db queries and the STOP button

2005-10-28 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi Jochem, Thanks for replying I just had the idea (never tried it myself) that you could possibly fork the request process and let the child process perform the query It makes perfectly sense to us, but it seems it is only possible to fork (pcntl_fork) with php

Re: [PHP-DB] Long running db queries and the STOP button

2005-10-27 Thread Jochem Maas
Bastien Koert wrote: Few things I can think of: 1. warn the user that the query may take some time and then show a splash type screen that indicates that something is happening 2. Run the whole thing in a new window without the toolbar 3. rework the query so it doesn't take so much time. If

Re: [PHP-DB] how do i fetch some text

2005-05-31 Thread Jochem Maas
chintan wrote: how do i fetch some text from a webpage for some generated field? like i want to fetch a score line from a sport site in which the line says score? actually i want to fetch an IP from my ISP's page which displays it with my user name. where is the DB in this question?

Re: [PHP-DB] Letters loop

2005-05-26 Thread Jochem Maas
MIGUEL ANTONIO GUIRAO AGUILAR wrote: Hi!! I wanna a do a for loop with letters, Is this possible? for ($i = 'A'; $i = 'Z'; $i++){ // code } try it. php -r ' for ($i = a; $i z; $i++){ echo $i,.; } echo z;' -- MIGUEL GUIRAO AGUILERA Logistica R8 - Telcel Tel:

Re: [PHP-DB] Transaction over persistent connection problem

2005-04-27 Thread Jochem Maas
Manuel Lemos wrote: Hello, on 04/27/2005 11:49 AM Oskar said the following: Ok. So the idea of splitting one transaction into two steps of a script is wrong? Yes, it is not possible to achive that. What happens is that first access to script is handled by one Web server process or thread and

Re: [PHP-DB] Queries close session

2005-03-15 Thread Jochem Maas
Adept-Hosting.Net Administration wrote: I am using the following script to maintain a login session on some pages: ?php session_start(); if(empty($_SESSION['username'])) { die('An error has ocurred. It may be that you have not logged in, or that your session has

Re: [PHP-DB] ways of making access and visib compat with 4 and 5

2005-03-14 Thread Jochem Maas
tony yau wrote: hi all, I'm trying to make my classes compat with php4 and php5 is there a way of doing something like this: if( version== 4) define( VISIBILITY, ); else if (version==5) define( VISIBILITY, protected ); class Flex { VISIBILITY function CompatFunc(); } this will never

Re: [PHP-DB] Log in multiple users to MySql

2005-03-12 Thread Jochem Maas
Mahmoud Badreddine wrote: I authenticate users of my database with the Apache dialog box. I would like to know where do these values (usernames and passwords) get stored so that I can use this information to log in to the MySql database. its not a DB related question, you should have posted at

Re: [PHP-DB] How to programmatically finding freetds.conf location?

2005-03-12 Thread Jochem Maas
Ashwari Nugraha wrote: Thanks Joseph, I understood about your idea. But it can be more than one freetds.conf found, all I need is finding ones which is used by mssql_connect(). Some people do not delete FreeTDS installation source that is still contain that file. if you know that then you know the

Re: [PHP-DB] Forms...

2005-03-10 Thread Jochem Maas
Neil Smith [MVP, Digital media] wrote: At 07:52 10/03/2005 +, you wrote: Message-ID: [EMAIL PROTECTED] Date: Wed, 09 Mar 2005 20:37:36 +0100 From: Jochem Maas [EMAIL PROTECTED] if your into XHTML: input name=right_eye type=checkbox value=1 checked=checked value=1 / Actually that's invalid

Re: [PHP-DB] Forms...

2005-03-09 Thread Jochem Maas
Bastien Koert wrote: I use this format input name=right_eye type=checkbox value=1 ? if ($rows['right_eye']==1) { echo CHECKED ; } ?nbsp;Right Eye(s) if your into XHTML: input name=right_eye type=checkbox value=1 checked=checked value=1 / (Bastien already showed how to dynamically determine

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Jochem Maas
Martin Norland wrote: ioannes wrote: My first attempt was to use $result=array_merge($result1,$result2) - doesn't work. 'not a valid resource' I have two databases with different connections, so MySQL UNION query would not work. How do I merge the result set of the queries in that case?

Re: [PHP-DB] insertion problem (2)

2005-03-09 Thread Jochem Maas
Stephen Johnson wrote: This may not necessarily be the problem. But I am not sure that you should be capitalizing the first character of your variable. That is a special type of PHP variable - which I do not use normally - so I can not remember what it is called. However, put all your variables

Re: [PHP-DB] Merge result set of query?

2005-03-09 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: Martin Norland wrote: while (($row = mysql_fetch_row($result)) || ($row = mysql_fetch_row($result2))) { // just do it. } .. work (due to shortcircuiting)? and how ugly is it? // foo } That would work if you just wanted to iterate over both

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Hi all, long time no post... I've rebuilt a download tracking system my company uses. I built the original, and thought that a restructure would be a doddle! Ooops! ;-) Anyhoo... I used to capture each download in it's own row, replicating user data each time. (Eg: if a

Re: [PHP-DB] PHP and JOIN... (I know.. it's easy!)

2005-03-08 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Cool. cheers for the quick responce... Well, my flatmate is one of two, I live with a lesbian couple in London... One is a falsh guru, sho recently got into PHP (she's a REAL brain box, and picsk stuff up sooo much quick than us mere mortals!) Hard life init ;-) shucks.

Re: [PHP-DB] Random Password problem

2005-03-08 Thread Jochem Maas
J. Connolly wrote: I am using this php in order to create, store and send random passwords to people who want to join my mailing list. ?php function random_password () { $seed = (integer) md5(microtime()); mt_srand($seed); your seeding the randomizer with the value zero each time! the

Re: [PHP-DB] GD2 library

2005-03-05 Thread Jochem Maas
Balwant Singh wrote: Sorry I am asking a question which is not directly linked to this forum but i am confident that many of you have the answer for it. is it that much trouble to ask you question in the 'correct forum', there is the php-generals list next door where this question fits perfectly.

Re: [PHP-DB] error handling in query execution

2005-03-04 Thread Jochem Maas
Chenri wrote: i have a script that update records with this construct: while( ){ query_string='UPDATE ...'; updateRecord(query_string); } the problem is when there are wrong query_string (such as incorect syntax) can i make sure that the other query, the next one after the

Re: [PHP-DB] php5-sessions next

2005-03-03 Thread Jochem Maas
mel list_php wrote: Dear Martin, Thank you very much for that, I made the suggested changes. The problem was again coming from the session.save_path directive which was not well configured. With your settings I know have a wonderful display of undefined index, coming from all that non

Re: [PHP-DB] Expiry Date ($date function)

2005-03-03 Thread Jochem Maas
Ron Piggott wrote: That strtotime is a neat little command. With a bit more searching I found that this works: $expiry_date = strtotime(+21 days); $expiry_date = date('Y-m-d', $expiry_date); echo $expiry_date; The computer couldn't cope with me doing it in just one line --- I got a parse error.

Re: [PHP-DB] Re: Problem with mysql_fetch_array after first loop...

2005-03-03 Thread Jochem Maas
Steve McGill wrote: Jeffrey Baumgartner [EMAIL PROTECTED] schreef in bericht news:[EMAIL PROTECTED] I've made a little programme that deletes expired records from database tables. The troublesome bit looks like this... $query = SELECT ic FROM ic_ic WHERE date = CURDATE(); $result =

Re: [PHP-DB] suggestions

2005-03-03 Thread Jochem Maas
Mignon Hunter wrote: Hello Mignon, this is really a php-generals question me thinks (you don't even mention a DB ;-), regardless I need to dev a small app and I can think of a couple different ways to handle it but not sure the best way. I need to register those who come to our site that

Re: [PHP-DB] suggestions

2005-03-03 Thread Jochem Maas
Mignon Hunter wrote: Sorry - forgot to mention the data I'm collecting will go into a dbase, that's why I posted here. fine. but your not having trouble putting data into a DB. yet. :-) Thanks I'll work with the session angle. Please see if this logic is flawed... The hyperlink to the pdf will

Re: [PHP-DB] Notice: Undefined index: op

2005-02-22 Thread Jochem Maas
Martin Norland wrote: J. Connolly wrote: ... You may want to use a different quoting style - I can't recall the name, but it's taken from perl HEREDOC. (i believe its custom to write it in capitals,) echo EOF form action=$_SERVER[PHP_SELF] method=POST ... the rest of your stuff, then on its

Re: [PHP-DB] JOIN problem

2005-02-08 Thread Jochem Maas
Zouari Fourat wrote: am using mysql 3 so i can't do that subquery, how can we do that in mysql 3 ? and neither can anyone else ;-)... rather a pain, but mysql.com have been kind enough to give a detailed explaination on how to rewrite subselect queries as join queries: If you put your brain in

Re: [PHP-DB] insert (database)

2005-02-03 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: Yemi Obembe wrote: the objective of the script below is to first search if a subscriber is already in a list before subscribing his email (so as to prevent double subscription). the select part works finebut the insert doesnt. know why? if ($v

Re: [PHP-DB] Form Mail Script/ Class

2005-02-03 Thread Jochem Maas
Malcolm JC Clark wrote: I am looking for a good reliable php script/ class to process enquiries. Maybe there is a de facto php script/ class like Matts perl Script Archive? try phpmailer: phpmailer.sourceforge.net Kind Rgds Malcolm -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] PHP5 classes mysql bug ?

2005-02-03 Thread Jochem Maas
Viacheslav Kaloshin wrote: Here is testcase PHP 5.0.3 (cli) (built: Dec 17 2004 10:47:41) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.3, Copyright (c) 1998-2004 Zend Technologies ?php class MySQL { private $mysql_link=0; private $mysql_result=0; function __construct() {

Re: [PHP-DB] insert (database)

2005-02-02 Thread Jochem Maas
Yemi Obembe wrote: the objective of the script below is to first search if a subscriber is already in a list before subscribing his email (so as to prevent double subscription). the select part works finebut the insert doesnt. know why? if ($v = strtolower($_POST['email'])) { what happens

Re: [PHP-DB] Developer needed in London

2005-01-28 Thread Jochem Maas
Underodog H.R. wrote: Sorry for using the list in this way, wont happen again. wtf. 'they' posted it twice with the same message... thats the definition of 'again'. the fact that 'they' can't even spell their company name correctly would make me think twice about working there ;-) Underodog H.R.

[PHP-DB] Re: [PHP] Re: [PHP-DB] Developer needed in London

2005-01-28 Thread Jochem Maas
Jochem Maas wrote: Underodog H.R. wrote: Sorry for using the list in this way, wont happen again. wtf. 'they' posted it twice with the same message... thats the definition of 'again'. I just noticed that they crossposted rather than post twice. -- PHP Database Mailing List (http://www.php.net

Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Developer needed in London

2005-01-28 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: Jochem Maas wrote: Underodog H.R. wrote: Sorry for using the list in this way, wont happen again. I just noticed that they crossposted rather than post twice. That's three times now I've seen the statement that it won't happen again! Unforgivable

Re: [PHP-DB] if statement

2005-01-28 Thread Jochem Maas
Craig Hoffman wrote: Hi There, I am trying to write an if statement to see if an array has any values in it and if it does do something. for example: $ticklist2 = array('$values) if (array_values(empty($ticklist2))){ empty() is used to check whether a var isset and is not null, or false -

Re: [PHP-DB] works on command line, not on server

2005-01-26 Thread Jochem Maas
The Disguised Jedi wrote: try users@httpd.apache.org list On Tue, 25 Jan 2005 14:21:25 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have a new installation of php on an existing apache 2 server, and something strange is happening. The file 'test.php' works and connects to the database

[PHP-DB] firebird - equivalent of stristr() in Stored Procedure.

2005-01-26 Thread Jochem Maas
hi Guys, I'm using Firebird 1.5 with PHP5. I have a problem where by I am trying to do the equivelant of: $a = 'A'; $b = 'AG'; if (stristr($b, $a)) { // do something. } Inside a Stored procedure, where $a and $b are both input variables to the stored

Re: [PHP-DB] firebird - equivalent of stristr() in Stored Procedure.

2005-01-26 Thread Jochem Maas
Jochem Maas wrote: hi Guys, hope somebody can give me a clue :-), well about 5 mins after I posted I managed to find a solution thanks to a man named Ivan Prenosil (who by all accounts knows where his firebird towel is ;-) http://www.volny.cz/iprenosil/interbase/ip_ib_code_string.htm

Re: [PHP-DB] works on command line, not on server

2005-01-26 Thread Jochem Maas
[EMAIL PROTECTED] wrote: Thanks, I already had prefork installed. I solved the problem by heaven help those that walk the threaded path heh :-) changing to php 5 from php 4. IC interesting to know. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Define constants: awkward usage?

2005-01-26 Thread Jochem Maas
tony wrote: Hi all, I got this sets(20) of defined constants which using them as keys to an array eg define(FNAME, fname); farray = array( FNAME = hello ,...); my question is how do I insert that directly into a javascript(to do some client validation) I need this: var

Re: [PHP-DB] Really Stuck!

2005-01-25 Thread Jochem Maas
Ben wrote: Hello all, As a beginner I have been trying to send two attachments from my HTML form. the code you posted has no baring on DB stuff. so probably you question was better aimed at php-generals, anyways Below is the code I have been using. The problem is, I seem to only be able to

Re: [PHP-DB] Double Inserts

2005-01-25 Thread Jochem Maas
Bastien Koert wrote: post code...can't read minds, you know ;-) cant-help-myself style=no-disrespect-to: bastien; well yes, you have to understand Bastien is only an apprentice has not yet been initiated into the inner mind-readers circle. I on the other hand can tell you with utmost certainty

Re: [PHP-DB] Double Inserts

2005-01-25 Thread Jochem Maas
Martin Norland wrote: Bastien Koert wrote: I am but your padawan brilliant. Bastien [snip] From: Jochem Maas [EMAIL PROTECTED] cant-help-myself style=no-disrespect-to: bastien; well yes, you have to understand Bastien is only an apprentice has not yet been initiated into the inner mind-readers

Re: [PHP-DB] IIS, PHP, and session data

2005-01-25 Thread Jochem Maas
Perry, Matthew (Fire Marshal's Office) wrote: I am having trouble with my session data on Microsoft IIS. Here is a little background of the problem: 1) I am not personally in control of our web server. Our IT department manages it. They have IIS running on their sever and use MS SQL

Re: [PHP-DB] Auto Responses?

2005-01-24 Thread Jochem Maas
Nigel Jones wrote: Problems guys... Emails don't actually come from [EMAIL PROTECTED] they are sent to [EMAIL PROTECTED] and then sent like it was an email from the sender to x subscriber... Really you should be suggesting that the subjects be used in the event/filter things. Autoresponders DO

Re: [PHP-DB] Auto Responses?

2005-01-24 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: Nigel Jones wrote: Problems guys... Emails don't actually come from [EMAIL PROTECTED] they are sent to [EMAIL PROTECTED] and then sent like it was an email from the sender to x subscriber... Really you should be suggesting that the subjects be used

Re: [PHP-DB] Out of the Office

2005-01-24 Thread Jochem Maas
Hutchins, Richard wrote: Agh! You have GOT to be friggin' kidding me! chill. These autoresponders and the whole discussion of how they work or don't work are just cluttering up this list. true. Please just everybody do everybody else a favor and _think_ before you use/configure your

Re: [PHP-DB] Given only one mySQL user account by Host Company

2005-01-23 Thread Jochem Maas
Shay definitely has bad hosting. the guy wants a seperate mysql user with readonly privileges on his DB which is good practice. only ... his hostingco. has given him a single DB and a single user a/c. no doubt they manage their system via a webinterface - when every they add a customer, they

Re: [PHP-DB] GROUP BY? Urgent help needed with selection list

2005-01-23 Thread Jochem Maas
Chris Payne wrote: Hi there, The problem is, the database is imported from a huge properties database and can only be imported in the format from the central database of estate agents, so I can't reformat it in the tables itself. Each table has the same fields, but one is for condo's, one is for

Re: [PHP-DB] Re: Cannot load MySQL extension (mysql.so issues)

2005-01-21 Thread Jochem Maas
franciccio wrote: Eve Atley ha scritto: Platform: Redhat Linux Enterprise WS 3 PHP installed: 4.3.2 MySQL installed: 4.0.21 Apache installed: 2.0.46 When setting up PhpMyAdmin today, I got the error: Cannot load mysql extension, Please check PHP configuration My phpinfo() shows:

Re: [PHP-DB] Re: Cannot load MySQL extension (mysql.so issues)

2005-01-21 Thread Jochem Maas
Eve Atley wrote: women/girls deserve a little more leaway when entering this little world. if only because men have been jacking them around for the last 5000 years - which has only brought us war religion ;-) ROTFL!! Too funny. :) thanks. :-) I got the issue somewhat resolved. I was being a

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Jochem Maas
OR SELECT b.fldName, b.fldEmail, b.fldCountryCode, d.fldCode as FCode, b.fldMobile, a.fldTime as Time, c.fldUsername as Username FROM tblSubscribersChoices a LEFT JOIN tblUser c ON c.fldClientID = a.fldChoice LEFT JOIN tblSubscribers b ON

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: I'm not but his original query used JIONs and a LEFT JOIN is (IMHO) the easiest to understand. I didn't have the presence of mind to rewrite the query using a simple WHERE clause - hope your tip helps him. btw: can anyone say if the LEFT JOIN

Re: [PHP-DB] LEFT joins

2005-01-20 Thread Jochem Maas
values rather than an empty records. cheers for that :-) I remembered something along those lines but the specifics of JOINing always leak from my head. :-) Jochem Maas ha scritto: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Martin Norland wrote: Joseph Crawford wrote: Jason, can you explain why stripslashes should not be used on data taken from the db? when you store data in the db i thought it was good practice to addslashes, when you retrieve from the db, you will need to use stripslashes to remove the extra \ The

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Joseph Crawford wrote: Jason, can you explain why stripslashes should not be used on data taken from the db? when you store data in the db i thought it was good although 'slashing' text works pretty much all of the time (possibly the guys using exotic encodings all day will say different :-) but

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Simon Rees wrote: On Tuesday 18 January 2005 19:18, Jochem Maas wrote: I was always under the impression that single quotes (assuming you are delineating you args with single quotes) should (officially) be escaped with another single quote - although backslash also works: I think it depends

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: I was always under the impression that single quotes (assuming you are delineating you args with single quotes) should (officially) be escaped with another single quote - although backslash also works: INSERT INTO status (hunger) values ('I''ve just

Re: [PHP-DB] PHP 5.0.3 and Oracle9i on Windows 2000/Apache

2005-01-17 Thread Jochem Maas
Chaun Keating wrote: I am having trouble logging onto Oracle via PHP on a Windows 2000 machine. I keep getting the error: Fatal error: Call to undefined function OCILogon() in C:\Program Files\Apache Group\Apache2\htdocs\oraconnect.php on line 15 I seem to have everything set up correctly. I am

Re: [PHP-DB] Assistance on Query

2005-01-16 Thread Jochem Maas
Shannon Doyle wrote: Hi People, I would like some assistance on the following scenario. I have to pull out all records for a particular userid (easy enough) and then only show those entries where the follwing occurs. These records from the table will contain either an entry in the services_type

Re: [PHP-DB] Assistance on Query

2005-01-16 Thread Jochem Maas
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 17, 2005 1:37 AM To: Shannon Doyle Cc: php-db@lists.php.net Subject: Re: [PHP-DB] Assistance on Query Shannon Doyle wrote: Hi People, I would like some assistance on the following scenario. I have to pull out

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
Han wrote: Hi, I'm having a problem with some joins. My code is : -- SELECT b.fldName, b.fldEmail, b.fldCountryCode, b.fldMobile, a.fldTime as Time, c.fldUsername FROM tblSubscribersChoices a INNER JOIN tblUser c on a.fldChoice=c.fldClientID LEFT JOIN tblSubscribers b on a.fldClientID = b.fldID

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
BTW: Hans please use 'reply to all' so that the rest of the list can see your replies (+ it makes me feel less like you personal help-desk ;-). ...on to the reply proper: Han wrote: Hi, thanx for replying. It still times out when I use either of those alternatives. can you tell what exactly the

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
Han wrote: Oh yes, sorry, not used to the reply-all. most of us get hammered by that one once in a while! read on the the interesting bit... I've pasted it directly into the MYSQL console as just sql and this is where I discovered my problem. My code is : -- SELECT b.fldName, b.fldEmail,

Re: [PHP-DB] LEFT joins

2005-01-12 Thread Jochem Maas
Han wrote: Hmm, still no luck. Thanks for the help. I think I'll have to break the you mean that it still times out? crashes mysql? maybe the table (tc_countries) is corrupt? try doing a repair. select up into 2 selects and throw the results of the first into arrays. Didn't want to do it like

Re: [PHP-DB] Slow Query

2005-01-12 Thread Jochem Maas
Wendell Frohwein wrote: snip So I rewrote my script to do the follow: The client submits a property for an appraisal. Based on the appraisal type and property zip code, It does a radius search of 2 miles from the property zip. If no matches are found, it does a 5 mile radius search. For every zip

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 10:40 AM Subject: [PHP-DB] Update multiple records Having a problem here with updating multiple records in a table. [snip] Lets see - where to begin... SELECT *

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Stuart Felenstein wrote: Having a problem here with updating multiple records in a table. as Martin Norland (a heavy hitter on this list AFAIKT) already stated you don't seem to be at the stage of actually doing an update, no big deal - only you are doing yourself an injustice by given a

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 11:59 AM Subject: Re: [PHP-DB] Update multiple records ... That's what I get for troubleshooting before lunch! My apologies to the list and to anyone unfortunate enough

Re: [PHP-DB] Update multiple records

2005-01-10 Thread Jochem Maas
Stuart Felenstein wrote: --- Jochem Maas [EMAIL PROTECTED] wrote: don't be sorry, be pro-active and rewrite it until its idiot proof. its in your own best interest - the clearer you state your problem the greater the chance someone will/can help you. I don't know about anyone else, but I

Re: [PHP-DB] ssh tunneling with phpmyadmin

2005-01-10 Thread Jochem Maas
Jason Wong wrote: On Tuesday 11 January 2005 11:39, Graham Anderson wrote: is it possible to ssh tunnel with phpmyadmin I want to access my remote db [on shared server] from my phpmyadmin on my laptop my ISP wonderfully disabled phpmyadmin's relational features :( seems a bit hard to find the info

Re: [PHP-DB] String Parsing/Escaping

2005-01-09 Thread Jochem Maas
hi Alexander, interesting question regarding 'safety' v. readability v. speed - I'm sure you'll get different views depending on who you ask. Here is my take: Alexander Mueller wrote: Hi, below are three versions of an SQL call along with escaping the passed value.

Re: [PHP-DB] MySQL ENCRYPT help!

2005-01-09 Thread Jochem Maas
Kevin the Linux User wrote: To the PHP Database Mailing-List: I joined the mailing list for this one question I just can't figure out. nice, we help you and then you bugger off? - community spirit are go! I used the phpMyAdmin to create table. I placed one row in this table, I used the ENCRYPT

Re: [PHP-DB] SQL statement

2005-01-07 Thread Jochem Maas
PHPDiscuss - PHP Newsgroups and mailing lists wrote: Hello everybody, I'm building a small application and I have trouble passing a POST variable form one page to another inside the SQL statement. The query displayed below works great without the .$_POST['CompanyName']. $query_company_listing =

Re: [PHP-DB] setFetchMode problem with mssql/w2003/php503

2005-01-07 Thread Jochem Maas
ltlists wrote: I'm getting this error when attempting to use setFetchMode() PHP Fatal error: Call to undefined method DB_result::setFetchMode() in new.php on line 27 which means that class DB_result does not have a setFetchMode() method. did you read past the colon (:) in the error message? did

Re: [PHP-DB] SQL statement

2005-01-07 Thread Jochem Maas
Jason, can you please turn off the return receipts on emails you send to the list. it's bloody annoying to have 'The Sender wishes to be notified' popup messages everytime I read one of your emails (and, alas, I don't have the skill to hack the return receipt crap right out of Tbird). BTW

Re: [PHP-DB] select text from a text file

2005-01-07 Thread Jochem Maas
Ed wrote: Hi, Thanks for answering the question. I'm going to make it write to a database rather than text file after searching google and coming accross common problems with text files. I've now just got to figure out how to mark the message as read in the database so it does not re-appear next

Re: [PHP-DB] select text from a text file

2005-01-07 Thread Jochem Maas
grabbed message after you have selected it for output. have fun! Ed - Original Message - From: Jochem Maas [EMAIL PROTECTED] To: Ed [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Friday, January 07, 2005 11:37 AM Subject: Re: [PHP-DB] select text from a text file Ed wrote: Hi, Thanks

Re: [PHP-DB] Fetch data from dbf file?

2005-01-07 Thread Jochem Maas
Supri anto wrote: hi all, did anyone know how to fetch data from dbf file (Clipper) ? use some code. don't expect too much help if all you can be bothered to write are single line questions. I googled 'DBF + PHP' and came up with this: http://half2.mirrors.phpclasses.org/browse/package/1302.html

Re: [PHP-DB] php problem

2005-01-06 Thread Jochem Maas
Serenity Schindler wrote: I am new to php and have no idea what I'm doing wrong. I have a file named test.php containing: html head title PHP Test /title /head body pThis is an HTML line p ?php echo This is a PHP line; phpinfo(); ? /body /html The html lines show up just fine but none of

Re: [PHP-DB] PHP query to mysql database returns emtpy data, but Query Browser shows records

2005-01-06 Thread Jochem Maas
graeme wrote: Hi, You have: $query example = SELECT description from cpProducts where category='39 47 48 172' don't you want to add a logical operator such as OR, possibly AND $query example = SELECT description from cpProducts where category='39 OR 47 OR 48 OR 172' graeme. whatever it is that

Re: [PHP-DB] PHP query to mysql database returns emtpy data, butQuery Browser shows records

2005-01-06 Thread Jochem Maas
jwalker wrote: No the category field is varchar(250) and uses spaces to parse each element within the field. The database is an osCommerce hybrid - not my own. The values within the category field go from one number to an X set of numbers, separated by spaces. This is making development rather

Re: [PHP-DB] str_replace question

2005-01-06 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Bastien Koert [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 8:34 AM Subject: Re: [PHP-DB] str_replace question [snip] A neat little trick would be to create the initial part of the statement with a predefined where clause based

Re: [PHP-DB] str_replace question

2005-01-06 Thread Jochem Maas
Brent Baisley wrote: I can't think of an instance where a query would have the phrase WHERE AND. Perhaps if you post the contents of the $additionalsql variable, we can tell you why it's not working. You may actually be looking to use an array tried to explain that to him already, either he

Re: [PHP-DB] terminates string?

2005-01-06 Thread Jochem Maas
Perry, Matthew (Fire Marshal's Office) wrote: I am using PHP 4.3.1 and running Apache Server and MySQL. The following question is probably only related to PHP. Here is the problem: I am passing the following string from one form to another:

Re: [PHP-DB] Stopping display of DB errors

2005-01-06 Thread Jochem Maas
Todd Cary wrote: When I run a query using Interbase and if an error occurs, the error displays in the browser window even though I am testing for errors. Is there a way to prevent this? function db_insert_logon_session($dbh, $sessionid, $offset) { $fulldate = date(m/d/Y H:i:s,time() +

Re: [PHP-DB] MySQL Auto PK

2005-01-06 Thread Jochem Maas
Andrew Kreps wrote: ... 20050105-1 20050105-2 20050106-1 ...etc. This would be a great place for a stored procedure, but I don't know if I can recommend running MySQL 5 to you. The most platform-safe way an open source alternative that does offer this enterprise level functionality (stored

Re: [PHP-DB] Warnings and Notices

2005-01-06 Thread Jochem Maas
Jason Davis wrote: I just got the software I was fighting with working. Only issue now is that the top of the page is filled with notices and warnings, even though the code is working. Is there any way to turn off or hide these notifications? read them and fix your code is one way. another is to

Re: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Jochem Maas
Ford, Mike wrote: To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 06 January 2005 16:39, Jochem Maas wrote: Hutchins, Richard wrote: echo $dsn; $isPersistant = TRUE; doesn't effect the code but 'Persistant' is spelled

[PHP-DB] I'm trying to out perform Martin Norland....

2005-01-06 Thread Jochem Maas
in terms of helpfulness and volume of replies to Q's on this list ;-) but it doesn't help that my mails seem to take hours to reach the list (Martin's keep beating mine to show up). is the list-server against me? or do others also see loads of lag? rgds, Jochem PS - as an even bigger kick

Re: [PHP-DB] $_GET of array variables

2005-01-05 Thread Jochem Maas
in the script that recieve the form submission try adding the following lines to view the contents of the $_GET superglobal array. echo 'pre'; print_r( $_GET ); echo '/pre'; once you see the structure it should be clear what array index key(s) you should be using to get to the relevant values.

Re: [PHP-DB] Display records on form

2005-01-05 Thread Jochem Maas
I'm resending this email as it does seems to have made its way onto the list (as far as I can see) - apologies if this is a double post. anyone else interested in recieving the pagination function I mention below can mail me offlist. here is the original reply: David Ziggy Lubowa wrote:

Re: [PHP-DB] MySQL Auto PK

2005-01-05 Thread Jochem Maas
OOzy Pal wrote: Dears, Is it possible to have mysql at an ID as 20050105-1 as (MMDD-1), -2, etc. probably, possibly, maybe. take your pick. as Martin Norland already pointed out to someone else; this is not [EMAIL PROTECTED] (that beauty of a comment is forever burned into my neo-cortex! :-)

Re: [PHP-DB] $_GET of array variables

2005-01-05 Thread Jochem Maas
Jochem Maas wrote: in the script that recieve the form submission try adding the following lines to view the contents of the $_GET superglobal array. echo 'pre'; print_r( $_GET ); tip for those pulling their hair out: PRINT_R() is your friend!!! ...sometimes referred to as the poormans debugger

Re: [PHP-DB] MySQL database converter ?

2005-01-04 Thread Jochem Maas
Nayyar Ahmed wrote: Hello All: Is there any tool available for conversion of M$ Access, Oracle etc Databases to MySQL database ? google will probably give you more answers than this list (try also searching for the term 'datapump' and variations on it) IBExpert is one tool that will allow you to

Re: [PHP-DB] Removing first word from a string?

2005-01-04 Thread Jochem Maas
Chris, I'll try to explain the basics of a technique I often use: imagine you have 0 or more possible where clauses. start of with an empty array e.g. $whereClauses = array(); now for each clause you need add the relevant subclause as a seperate item to the array (DO NOT include the AND or

Re: [PHP-DB] Display records on form

2005-01-04 Thread Jochem Maas
David Ziggy Lubowa wrote: On Tuesday 04 January 2005 10:10, David Ziggy Lubowa wrote: Hey guys , I was wondering , i have 16 records within a table in my Database , i have managed to have a form which can add and modify the records. My only problem is how i can display on a form when i search. Can

Re: [PHP-DB] NULL VALUE

2005-01-03 Thread Jochem Maas
first off it would help if you specified what DB you are using and if you are using a DB abstraction lib like PEAR::DB or something similar. also have you tried running these lines directly in a cmdline sql client? is the status column variable width? if not then the value may be 'Active '

Re: [PHP-DB] NULL VALUE

2005-01-03 Thread Jochem Maas
Norland, Martin wrote: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:16 PM Subject: Re: [PHP-DB] NULL VALUE LightBulbMoment (tm): 5 seconds of searching on the MYSQL site tells me STATUS is a keyword. try either renaming your field

Re: [PHP-DB] NULL VALUE

2005-01-03 Thread Jochem Maas
Hi Matthew, there are some more comments below but just for the record could you confirm that you are retrieving one or more rows when you issue the following SQL: SELECT * FROM `employee` WHERE `status` IS NULL; if you are getting no rows back then the obviously updating based on the status

  1   2   >