Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 08:46 +0100, Jochem Maas wrote: > 1000 + 1 != 10001 > > you might consider setting a default of 1000 or 1 or whatever on > the given > field so it's automatically populated with that number when a contact > record is > created. Sorry. Hit the 0 one to few times. -- Mich

Re: [PHP] Weird pdo-mysql behavior

2008-11-14 Thread Martijn Korse
I agree, add some checks in your testcase so you can track exactly what is happening and see of what type your variables are. Also, try what happens when you - switch off persistent-connections (PDO::ATTR_PERSISTENT=> false) - pass the object by reference (getClientFullName($id,&$dbh)) - htt

Re: [PHP] Weird pdo-mysql behavior

2008-11-14 Thread Thodoris
I agree, add some checks in your testcase so you can track exactly what is happening and see of what type your variables are. Also, try what happens when you - switch off persistent-connections (PDO::ATTR_PERSISTENT=> false) Tried that using both ways because I saw a similar error in anothe

Re: [PHP] Weird pdo-mysql behavior

2008-11-14 Thread Thodoris
Perhaps when you try to make the connection you should check the return value and use whatever PDO error-checking methods exist to find out what went wrong, instead of blindly going forward assuming you have a database connection when you don't. As a said before I have dumped the hander

Re: [PHP] Weird Syntax Error

2008-11-14 Thread Thodoris
-Original Message- From: Edgar da Silva (Fly2k) [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 9:39 AM To: Kyle Terry Cc: PHP General Mailing List Subject: Re: [PHP] Weird Syntax Error Try: $insert = "INSERT INTO release_file_upload (upl_file_name, upl_file_type, upl_file_

Re: [PHP] standard safe permissions for php scripts in web directory

2008-11-14 Thread Thodoris
Sounds like a weird question though :( what should be standard safe php script/directory permissions under Apache. This can vary in some cases. Generally speaking all scripts that ran by apache (using the php module) are using the rights of the user that apache is running as. So this user

Re: [PHP] mySQL query question

2008-11-14 Thread Thodoris
okay I want to pull an integer from a database called confirm_number, add 1 and repost it back to the database here's the code I'm using. $queryconfirm="SELECT confirm_number from contacts ORDER BY contact DESC LIMIT 1"; I assume that you are already aware that if you set the variable

[PHP] Comparative performance

2008-11-14 Thread Richard Heyes
Hi, Can I get input on the following: Uncompressed library: 15k Compressed library, but using the PHP engine (ie ob_start()): 3.5k Which would be better? Obviously from the client perspective compressed would be better, but from the servers perspective...? An increase in the amount of time to pu

Re: [PHP] Comparative performance

2008-11-14 Thread Rene Veerman
Richard Heyes wrote: Hi, Can I get input on the following: Uncompressed library: 15k Compressed library, but using the PHP engine (ie ob_start()): 3.5k Which would be better? Obviously from the client perspective compressed would be better, but from the servers perspective...? An increase in t

[PHP] Accessing mysql_fetch_object with variable names

2008-11-14 Thread Baniz Daymov
So, I have a newbie syntax question, sorry to bother you with noddy stuff. I have fetched a set of results from a database quesry using mysql_fetch_object. I want to iterate through a subset of the columns from each result, as defined by a separate array. I don't seem to be able to find the correc

Re: [PHP] Comparative performance

2008-11-14 Thread Richard Heyes
> What do you mean by compressed lib? JS? Javascript minification and HTTP gzip compression. Doing this got a 25k+ library down to 3.5k (!). -- Richard Heyes HTML5 Graphing for FF, Chrome, Opera and Safari: http://www.rgraph.org (Updated November 1st) -- PHP General Mailing List (http://www.p

Re: [PHP] Comparative performance

2008-11-14 Thread Rene Veerman
Richard Heyes wrote: What do you mean by compressed lib? JS? Javascript minification and HTTP gzip compression. Doing this got a 25k+ library down to 3.5k (!). then definately cache the result (on disk!) (both plaintext and gzip), output the cached result each time you can. overhead

Re: [PHP] how to implement search on site

2008-11-14 Thread tedd
At 9:26 AM + 11/13/08, Jignesh Thummar wrote: I have site of around 25 pages (pure HTML pages). I want to implement search functionality? How can I? i want to avoid database. And Apache Lucene, i dont't want to use it. Does any PHP framework provide search and indexing functionality (Exceptio

[PHP] Re: Accessing mysql_fetch_object with variable names

2008-11-14 Thread Matt Jones
I have been thumped with the clue bat and now have a solution. Thanks for your time! -- Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Accessing mysql_fetch_object with variable names

2008-11-14 Thread Baniz Daymov
I have been thumped with the clue bat and now have a solution. Thanks for your time! -- BD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] how to implement search on site

2008-11-14 Thread tedd
At 8:24 AM -0600 11/13/08, Boyd, Todd M. wrote: If you're mainly worried about indexing public pages, why not implement a Google custom search? They do all the heavy lifting--you just worry about maintaining your website. All the same SEO you do for Google will then apply to your website internal

Re: [PHP] mySQL query question

2008-11-14 Thread Martijn Korse
I would create a separate table for this (confirmation_numbers or something) with an autoincrement primary key. That way you can simply insert a new record for you contact and then ask (using mysql_insert_id()) what the confirmation number is. This approach is much safer as you can be 100% sure th

[PHP] mySQL query question

2008-11-14 Thread ceo
> okay I want to pull an integer from a database called confirm_number, > add 1 and repost it back to the database No, you don't want to do that. :-) You are introducing a race condition between TWO users who hit the same page at the same time. They each get, say, 42, and they each pu

Re: [PHP] mySQL query question

2008-11-14 Thread Bastien Koert
On Fri, Nov 14, 2008 at 9:58 AM, <[EMAIL PROTECTED]> wrote: > > > okay I want to pull an integer from a database called confirm_number, > > add 1 and repost it back to the database > > No, you don't want to do that. > :-) > > You are introducing a race condition between TWO users who hit the same

Re: [PHP] mySQL query question

2008-11-14 Thread mikesd1
update contacts set confirm_number = confirm_number + 1 order by contact desc limit 1 Here is the php query I've been using to send the record in the first place $query="INSERT INTO contacts (first_name, last_name, email, phn_number, address, city, state, zip, dates, comments, confirm_number)

Re: [PHP] Comparative performance

2008-11-14 Thread Robert Cummings
On Fri, 2008-11-14 at 12:12 +, Richard Heyes wrote: > Hi, > > Can I get input on the following: > > Uncompressed library: 15k > Compressed library, but using the PHP engine (ie ob_start()): 3.5k > > Which would be better? Obviously from the client perspective > compressed would be better, bu

[PHP] Re: how to implement search on site

2008-11-14 Thread Al
Jignesh Thummar wrote: I have site of around 25 pages (pure HTML pages). I want to implement search functionality? How can I? i want to avoid database. And Apache Lucene, i dont't want to use it. Does any PHP framework provide search and indexing functionality (Exception Zend_Lucene)? Thanks,

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
[EMAIL PROTECTED] wrote: >> update contacts set confirm_number = confirm_number + 1 order by >> contact >>> desc limit 1 > > Here is the php query I've been using to send the record in the first > place > > $query="INSERT INTO contacts (first_name, last_name, email, phn_number, > address, city, s

Re: [PHP] mySQL query question

2008-11-14 Thread Bastien Koert
On Fri, Nov 14, 2008 at 1:22 PM, <[EMAIL PROTECTED]> wrote: > update contacts set confirm_number = confirm_number + 1 order by >> contact >> >>> desc limit 1 >>> >> > Here is the php query I've been using to send the record in the first > place > > $query="INSERT INTO contacts (first_name, last_na

Re: [PHP] mySQL query question

2008-11-14 Thread mikesd1
>Ok, so just that I am clear, you are SELECTing and pulling all the data >that you are submitting in the above INSERT statement from the DB >initially, >then you are only modifying the confirm_number value and then re- >submitting all the values, as they originally were, Well, actually when all

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
[EMAIL PROTECTED] wrote: >> Ok, so just that I am clear, you are SELECTing and pulling all the data >> that you are submitting in the above INSERT statement from the DB >> initially, >> then you are only modifying the confirm_number value and then re- >> submitting all the values, as they origina

[PHP] user access/roles/privs functionality

2008-11-14 Thread bruce
Hi list... I need a way of managing users/teams/etc.. implementing roles/access rights/privs,etc... I'd like a way of being able to have users "report to" the resource above them, ie, the ability to have a hierarchical kind of tree approach would be good as wel, as this would allow different user

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
Jim Lucas wrote: > [EMAIL PROTECTED] wrote: >>> Ok, so just that I am clear, you are SELECTing and pulling all the data >>> that you are submitting in the above INSERT statement from the DB >>> initially, >>> then you are only modifying the confirm_number value and then re- >>> submitting all the

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote: > > '{$Comments}', > > @confirm_number > > ) > > The above should be this instead > > @confirm_number > ); Even after fixing that, nothing gets inserted into the database. I've b

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
Michael S. Dunsavage wrote: > On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote: >>> '{$Comments}', >>> @confirm_number >>> ) >> The above should be this instead >> >> @confirm_number >> ); > > Even after fixing that, nothing gets

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
Jim Lucas wrote: > Michael S. Dunsavage wrote: >> On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote: '{$Comments}', @confirm_number ) >>> The above should be this instead >>> >>> @confirm_number >>> ); >> Even after f

[PHP] RegEx to check for non-Latin characters

2008-11-14 Thread Behzad
Dear List, For a Form Validation process, I need a function to avoid Latin characters to be provided as the first or last name. Since we expect our users to enter their personal info in Persian. Do you know any regular expression to provide this functionality? 1) Regex to check whether there are

[PHP] $60 Reward, 1 Hour Eclipse Project

2008-11-14 Thread johny why
- Tasks $60 reward to walk me through a successful Eclipse PHP debug session of doProject on my IIS server. The only task here is to get a debug session going. There will not be any IIS support or PHP programming involved. Should only be some basic config settings in Eclipse. - Time Frame

[PHP] Variable Argument List

2008-11-14 Thread Daniel Kolbo
Hello, I am trying to do something like the following: I understand why this outputs: 'yo','bob':default2 However, I want it to output: yo:bob Is this possible? I tried using different combinations of {}, but I cannot seem to get it to happen. I need some kind of "preprocessor" feature per

Re: [PHP] Variable Argument List

2008-11-14 Thread Daniel Kolbo
Daniel Kolbo wrote: Hello, I am trying to do something like the following: I understand why this outputs: 'yo','bob':default2 However, I want it to output: yo:bob Is this possible? I tried using different combinations of {}, but I cannot seem to get it to happen. I need some kind of "pre

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
On Fri, 2008-11-14 at 12:46 -0800, Jim Lucas wrote: > SELECT @confirm_number AS confirm_number; Are we not SELECTING the column value here? should we be selecting confirm_number as confirm_number? -- Michael S. Dunsavage -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit