Re: [PHP-DB] MOD_Rewrite

2011-09-20 Thread Daniel Brown
On Tue, Sep 20, 2011 at 17:01, Gavin Chalkley gavin.chalk...@gmail.com wrote: Hey all, I am trying to use MOD_Rewrite with EasyPHP. I have this in my htaccess: RewriteEngine On RewriteBase / RewriteRule ^([0-9]+)/?$ main_index.php?key=$1 My main page is MAIN_INDEX.PHP my db identifier

Re: [PHP-DB] Re: Using MySQLi (OOP) to call a stored procedure with INOUT and OUT parameters.

2011-09-13 Thread Richard Quadling
On 13 September 2011 04:21, Ross McKay ro...@zeta.org.au wrote: On Mon, 12 Sep 2011 21:18:34 +0100, Richard Quadling wrote: I'm just trying to get PHP to talk to a stored procedure which has IN, INOUT and OUT parameters. [...] You'll probably need to trick it into returning a row with your

Re: [PHP-DB] Re: Using MySQLi (OOP) to call a stored procedure with INOUT and OUT parameters.

2011-09-13 Thread Ross McKay
G'day Richard, I've seen this return a row mechanism. But that allows me to define IN parameters and to capture OUT params, but does nothing for INOUTs (as far as I can tell). Possibly, but could be worth a try except... you want to be able to use prepared statements, and I don't know whether

Re: [PHP-DB] Using MySQLi (OOP) to call a stored procedure with INOUT and OUT parameters.

2011-09-12 Thread Karl DeSaulniers
Hi Richard, For your mysql, found this link, which I'm sure you've probably found, but hth. http://php.net/manual/en/pdo.prepared-statements.php Googled: stored procedure with INOUT and OUT parameters mysqli For your bind statement, found this link, hth.

Re: [PHP-DB] Compatibility with PHP and MySQL

2011-09-05 Thread Chris Stinemetz
On Mon, Sep 5, 2011 at 3:49 PM, Gabriel Solberg solbergdes...@gmail.com wrote: Will installing the most recent XMAPP to install PHP MySQL and Apache to create a development environment on my local computer affect how everything runs when I upload it to the server (My web host 1and1.com runs php

Re: [PHP-DB] Fatal Error - Undefined function mysqli_connect

2011-09-04 Thread Lester Caine
Ben wrote: My server was upgraded to PHP 5.3.8 and MySQL 5.1.58 today and, since, I am getting a 500 error on any script requiring a DB connection. Upgraded from what? Sounds like the mysqli extension is no longer getting loaded. There will either be an error saying why, or it is still

RE: [PHP-DB] Fatal Error - Undefined function mysqli_connect

2011-09-04 Thread Ben
Lester wrote: Upgraded from what? Sounds like the mysqli extension is no longer getting loaded. There will either be an error saying why, or it is still commented out in the php.ini. Upgraded from PHP 4.3 and MySQL 4.1. Was using mysql_connect, but understand that mysqli is better/supported

Re: [PHP-DB] Fatal Error - Undefined function mysqli_connect

2011-09-04 Thread Lester Caine
Ben wrote: Upgraded from what? Sounds like the mysqli extension is no longer getting loaded. There will either be an error saying why, or it is still commented out in the php.ini. Upgraded from PHP 4.3 and MySQL 4.1. Was using mysql_connect, but understand that mysqli is better/supported

Re: [PHP-DB] Learning bound variables ??

2011-08-29 Thread Gavin Chalkley
Dian, I appreciate what it does and understand the redirect. What I am more refering to is the manner to which it is written On 29/08/2011 12:02, dian.armstr...@gmail.com wrote: It's redirect script on php. Cmiiw --Original Message-- From: Gavin Chalkley To: php-db@lists.php.net

Re: [PHP-DB] Learning bound variables ??

2011-08-29 Thread Amit Tandon
Dear Gevin I believe, u wish to understand about $this-... Actually this is object oriented way of writing the variable. Here this is a key word and refers to the this instance of the object. In simpler words if 2 different sessions are calling this line, then each will pass on the value of

Re: [PHP-DB] Learning bound variables ??

2011-08-29 Thread Gavin Chalkley
Amit, Many thanks for the explaination. Is there a good book, or site to look at to learn this Object oriented variable way of working? Is it a cleaner way to work? Or does it over complicate things? On 29/08/2011 14:53, Amit Tandon wrote: Dear Gevin I believe, u wish to understand about

Re: [PHP-DB] Re: MYSQLi fetch corrupting bound variables

2011-08-25 Thread Richard Quadling
On 25 August 2011 14:07, Jim Giner jim.gi...@albanyhandball.com wrote: First glance:  your 'if' needs '= ='  not '=' No. Fully ... if (False !== ($stmt = $dbObj-prepare(...))) { ... } In PHP, assignments evaluate to the value assigned. If the value assigned can be evaluated as TRUE then the

Re: [PHP-DB] SELECT online store discount %

2011-08-22 Thread Amit Tandon
Ron Have u thought of CASE (in SELECT)http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html. Remebber their is some syntactical difference in CASE for SELECT and CASE in procedures regds amit The difference between fiction and reality? Fiction has to make sense. On

Re: [PHP-DB] SELECT online store discount %

2011-08-22 Thread Ron Piggott
Subject: Re: [PHP-DB] SELECT online store discount % Ron Have u thought of CASE (in SELECT). Remebber their is some syntactical difference in CASE for SELECT and CASE in procedures regds amit The difference between fiction and reality? Fiction has to make sense. On Sun, Aug 21

Re: [PHP-DB] CURDATE()

2011-08-19 Thread who.cat
I tried on my db select count(*) from my_table where col_timestampcurdate(); the column col_timestamp type is timestamp,this sql works well. hope it helpful. All you best What we are struggling for ? The life or the life ? On Thu, Aug 18, 2011 at 5:21 PM, Geoff Lane

Re: [PHP-DB] CURDATE()

2011-08-18 Thread Geoff Lane
On Thursday, August 18, 2011, Ron Piggott wrote; What I tried below doesn’t work: ( CURDATE() . % ) Even though date values are presented like strings, they are dates/times. So you need to either cast CURDATE() to a string or else perform 'date arithmetic'. Check the manual for DATEDIFF(),

Re: [PHP-DB] Re: php-db foreign key

2011-08-10 Thread Karl DeSaulniers
On Aug 9, 2011, at 3:41 PM, Peter Lind wrote: On 9 August 2011 22:38, Chris Stinemetz chrisstinem...@gmail.com wrote: Yes, debug your code and figure out why it's looping twice instead. For instance, try the other query in the mysql console. Thank you! It was the first query. I put a

Re: [PHP-DB] Re: clues to cache-like behavior

2011-08-10 Thread Jim Giner
With IE, a refresh is F5 or even better, ctrl-F5. Should always get the latest updates. Or you could add: header(Cache-Control: no-cache); at the beginning of your php code. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: clues to cache-like behavior

2011-08-10 Thread Donovan Brooke
Jim Giner wrote: With IE, a refresh is F5 or even better, ctrl-F5. Should always get the latest updates. Or you could add: header(Cache-Control: no-cache); at the beginning of your php code. Well, that works! :-/ (I'm embarrassed to say) For some reason I over-thought that one. Thx,

Re: [PHP-DB] Re: clues to cache-like behavior

2011-08-10 Thread Jim Giner
HTH! One thing - you should remove it after doing your development so that users can take advantage of caching on their systems. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] foreign key

2011-08-09 Thread Peter Lind
On 9 August 2011 20:31, Chris Stinemetz chrisstinem...@gmail.com wrote: Okay. I am pretty new to mysql so this may seem like a ridiculous question to some people. I am trying to use a LEFT JOIN query, but the results I am finding unusual. For every record occurrence there is for the query,

Re: [PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
Is users.user_id unique? yes it is. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] foreign key

2011-08-09 Thread Peter Lind
On 9 August 2011 20:49, Chris Stinemetz chrisstinem...@gmail.com wrote: Is users.user_id unique? yes it is. What does your result look like? Hard to say what the problem is without seeing the result. -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter:

Re: [PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
What does your result look like? Hard to say what the problem is without seeing the result. I am echoing the query and printing the get array just for debugging purposes, but below you can see how it is repeating its' self. Thank you Array ( [id] = Bella Roe 4980 Roe Blvd ) Bella

Re: [PHP-DB] foreign key

2011-08-09 Thread Peter Lind
On 9 August 2011 21:23, Chris Stinemetz chrisstinem...@gmail.com wrote: What does your result look like? Hard to say what the problem is without seeing the result. I am echoing the query and printing the get array just for debugging purposes, but below you can see how it is

Re: [PHP-DB] foreign key

2011-08-09 Thread Chris Stinemetz
Okay. I just validated it is not in the left join query, but in my php. I was able to build the correct relations. Does anyone see any think in the php code below that may cause duplicate table rows? Thank you all. ?php //store.php include_once 'includes/connect.php'; include_once

[PHP-DB] Re: php-db foreign key

2011-08-09 Thread Frank Flynn
You already have a foreign key, that is stores.store_by references users.user_id. You might not have declared it (which is OK) but if that is the key you want that is fine. I suspect you are seeing an inadvertent Cartesian product. The way you have written this query you will get one row

[PHP-DB] Re: php-db foreign key

2011-08-09 Thread Chris Stinemetz
On Tue, Aug 9, 2011 at 2:55 PM, Frank Flynn fr...@declan.com wrote: You already have a foreign key, that is stores.store_by references users.user_id. You might not have declared it (which is OK) but if that is the key you want that is fine. I suspect you are seeing an inadvertent Cartesian

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Peter Lind
When I dump the query and run it in console I get the results I want. Not sure what I am doing wrong. Your php code had more than one query running (one inside the other). It's the outer query that runs twice, not the inner one returning double the results -- hype WWW: plphp.dk / plind.dk

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Chris Stinemetz
Your php code had more than one query running (one inside the other). It's the outer query that runs twice, not the inner one returning double the results Thanks Peter, Do you have any suggestions on how to fix this? Thank you, Chris -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Peter Lind
On 9 August 2011 22:25, Chris Stinemetz chrisstinem...@gmail.com wrote: Your php code had more than one query running (one inside the other). It's the outer query that runs twice, not the inner one returning double the results Thanks Peter, Do you have any suggestions on how to fix this?

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Chris Stinemetz
Yes, debug your code and figure out why it's looping twice instead. For instance, try the other query in the mysql console. Thank you! It was the first query. I put a LIMIT 1 on it and now it is working correctly. I appreciate your help! Thank you, Chris -- PHP Database Mailing List

Re: [PHP-DB] Re: php-db foreign key

2011-08-09 Thread Peter Lind
On 9 August 2011 22:38, Chris Stinemetz chrisstinem...@gmail.com wrote: Yes, debug your code and figure out why it's looping twice instead. For instance, try the other query in the mysql console. Thank you! It was the first query. I put a LIMIT 1 on it and now it is working correctly. I

Re: [PHP-DB] Re: clues to cache-like behavior

2011-08-09 Thread Donovan Brooke
Jim Giner wrote: So you're saying a page refresh in your browser doesn't cure the problem? Hi, sorry for the delay.. Yes, page refresh/s is basically what I am doing to get to the latest edits (by clicking in and out of the edit area). Reloading the page one or more times works as well.

Re: [PHP-DB] Left Join

2011-08-07 Thread Peter Lind
Maybe it's just me, but I can't see anything that would work as foreign key for you to join on - neither table seems to have a foreign key On 7 August 2011 21:53, Chris Stinemetz chrisstinem...@gmail.com wrote: I am tyring to build a query that will take the most recent stores.store_date column

Re: [PHP-DB] Left Join

2011-08-07 Thread Chris Stinemetz
On Sun, Aug 7, 2011 at 3:00 PM, Peter Lind peter.e.l...@gmail.com wrote: Maybe it's just me, but I can't see anything that would work as foreign key for you to join on - neither table seems to have a foreign key Sorry for my ignorance. How do I create the foreign key? The two columns from

RE: [PHP-DB] Left Join

2011-08-07 Thread Toby Hart Dyke
@lists.php.net Subject: Re: [PHP-DB] Left Join On Sun, Aug 7, 2011 at 3:00 PM, Peter Lind peter.e.l...@gmail.com wrote: Maybe it's just me, but I can't see anything that would work as foreign key for you to join on - neither table seems to have a foreign key Sorry for my ignorance. How do I create

Re: [PHP-DB] Insert query error

2011-08-06 Thread Gavin Chalkley
Chris, Why not escape, and extract the data prior to Insert string? On 06/08/2011 05:41, Chris Stinemetz wrote: I am getting the following error trying to run the below query. Any suggestions on what I am doing wrong? Thank you, Something went wrong while inserting your store visitCannot add

Re: [PHP-DB] Insert query error

2011-08-06 Thread Amit Tandon
Chris The error is indicated by the keywords a foreign key constraint fails, This implies that some value in store table is missing which u are trying to insert in posts. So check for the value u are trying to input in post table. U have to check for the values of post_store field from the input

Re: [PHP-DB] Oracle NClobs

2011-08-05 Thread Lester Caine
n.a.mor...@brighton.ac.uk wrote: Can anyone help please? I am using Oracle 10g (10.2.0.3) with PHP 5.2.5. It may not be related, but there were a number of issues with BLOB ids in Firebird which were not fixed until 5.2.7, I don't have anything that old running now, but I think that it was

RE: [PHP-DB] Oracle NClobs

2011-08-05 Thread N . A . Morgan
Lester, Thanks for the advice, I tried to run this on a 5.2.17 install as well with the same results. Thanks anyway, Neil -Original Message- From: Lester Caine [mailto:les...@lsces.co.uk] Sent: 05 August 2011 17:08 To: php-db@lists.php.net Subject: Re: [PHP-DB] Oracle NClobs n.a.mor

Re: [PHP-DB] Oracle NClobs

2011-08-05 Thread Christopher Jones
On 08/05/2011 09:08 AM, Lester Caine wrote: n.a.mor...@brighton.ac.uk wrote: Can anyone help please? I am using Oracle 10g (10.2.0.3) with PHP 5.2.5. It may not be related, but there were a number of issues with BLOB ids in Firebird which were not fixed until 5.2.7, I don't have anything

Re: [PHP-DB] Oracle NClobs

2011-08-05 Thread Christopher Jones
On 08/05/2011 08:55 AM, n.a.mor...@brighton.ac.uk wrote: Guys, Can anyone help please? I am using Oracle 10g (10.2.0.3) with PHP 5.2.5. The following piece of code works with a CLOB, but not with an NCLOB. Can anyone shed any light please? There is no support for NCLOB in PHP OCI8.

RE: [PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
Arno Kuhl wrote: Not strictly a php issue but it's for a php app, hope that counts (plus I haven't had much joy googling this) I have a table with an id and a parentid. If it's a top-level record the parentid is 0, otherwise it points to another record, and if that record isn't a top-level

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Richard Quadling
On 28 July 2011 10:39, Arno Kuhl a...@dotcontent.net wrote: Arno Kuhl wrote: Not strictly a php issue but it's for a php app, hope that counts (plus I haven't had much joy googling this) I have a table with an id and a parentid. If it's a top-level record the parentid is 0, otherwise it

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Richard Quadling
And http://www.amazon.co.uk/exec/obidos/ASIN/1558609202/onlinepricecouk -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Lester Caine
Arno Kuhl wrote: I'm currently using MySQL but I'll switch databases if there's a compelling reason and no drawbacks. Thanks for the lead, I'm googling recursive queries. 'common table expression' is the thing to google for, but MSDN seem to have hijacked all the top spots.

RE: [PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
On 28 July 2011 10:39, Arno Kuhl a...@dotcontent.net wrote: Arno Kuhl wrote: Not strictly a php issue but it's for a php app, hope that counts (plus I haven't had much joy googling this) I have a table with an id and a parentid. If it's a top-level record the parentid is 0, otherwise it

Re: [PHP-DB] Listing parent ids

2011-07-28 Thread Richard Quadling
On 28 July 2011 12:30, Arno Kuhl a...@dotcontent.net wrote: On 28 July 2011 10:39, Arno Kuhl a...@dotcontent.net wrote: Arno Kuhl wrote: Not strictly a php issue but it's for a php app, hope that counts (plus I haven't had much joy googling this) I have a table with an id and a parentid. If

RE: [PHP-DB] Listing parent ids

2011-07-28 Thread Arno Kuhl
I'm currently using MySQL but I'll switch databases if there's a compelling reason and no drawbacks. Thanks for the lead, I'm googling recursive queries. 'common table expression' is the thing to google for, but MSDN seem to have hijacked all the top spots.

RE: [PHP-DB] Re: Listing parent ids

2011-07-28 Thread Arno Kuhl
I have a table with an id and a parentid. If it's a top-level record the parentid is 0, otherwise it points to another record, and if that record isn't a top-level record its parentid points to another record, etc (a linked list). Is there a single select that will return the complete

Re: [PHP-DB] Re: Listing parent ids

2011-07-28 Thread Jim Giner
Arno Kuhl a...@dotcontent.net wrote in message news:D349CC15D13F48DD8D4F6ED70062138C@point01... Hi Jim. I wanted the list of related parentids from current id to top-level (parentid=0). Ah - now that is a much different question! From your statement above, are you now saying you

Re: [PHP-DB] Re: Listing parent ids

2011-07-28 Thread Richard Quadling
On 28 July 2011 14:09, Arno Kuhl a...@dotcontent.net wrote: I have a table with an id and a parentid. If it's a top-level record the parentid is 0, otherwise it points to another record, and if that record isn't a top-level record its parentid points to another record, etc (a linked list).

RE: [PHP-DB] Re: Listing parent ids

2011-07-28 Thread Arno Kuhl
Hi Jim. I wanted the list of related parentids from current id to top-level (parentid=0). Ah - now that is a much different question! From your statement above, are you now saying you only want ONE list of related ids, not the entire society of possible 'families' in your table? Also -

Re: [PHP-DB] Re: Listing parent ids

2011-07-28 Thread Jim Giner
Arno Kuhl a...@dotcontent.net wrote in message news:DB930522404B4552B8A15AF991C57E30@point01... Hi Jim. Only one linked list of parentids. No siblings. Multiple records can have the same parentid, but that doesn't play a role. Okay. So you want only one 'family tree' at any given time, and

RE: [PHP-DB] Re: Listing parent ids

2011-07-28 Thread Arno Kuhl
If your data is based upon parentid and uniqueid, then you will need to change your data... http://data.bangtech.com/sql/nested_set_treeview.htm and once you've done that and find you can't deal with things (maybe it isn't for you), then

Re: [PHP-DB] UNION ALL

2011-07-18 Thread Amit Tandon
Dear Ron Try this === SELECT `cross_reference_article_2` FROM `frequently_accessed_passages_of_scripture_cross_reference` WHERE `cross_reference_article_1` = 1 UNION ALL SELECT `cross_reference_article_1` FROM

Re: [PHP-DB] how does this regular expression works

2011-07-14 Thread Richard Quadling
On 13 July 2011 14:04, Shahriyar Imanov sh...@imanov.name wrote: \head.*?\(?Phead_tag_innerHTML.*?)\\/head\ head.*?(?Phead_tag_innerHTML.*?)/head Options: case insensitive; ^ and $ match at line breaks Match the characters “head” literally «head» Match any single character that is not a line

Re: [PHP-DB] how does this regular expression works

2011-07-14 Thread Richard Quadling
On 13 July 2011 13:42, who.cat win@gmail.com wrote: head[^]*(.*?)/head head[^]*(.*?)/head Options: case insensitive; ^ and $ match at line breaks Match the characters “head” literally «head» Match any character that is NOT a “” «[^]*» Between zero and unlimited times, as many times as

Re: [PHP-DB] functions, the best way to implement and arrange them..

2011-07-13 Thread Taco Mathijs Hillenaar-Meerveld
yes, it was a structure like that i was looking for. so a class is a group of functions? i have heard about 'wrappers' to and from what i've heard it is the same thing? On Tue, Jul 12, 2011 at 11:36 PM, Karl DeSaulniers k...@designdrumm.comwrote: On Jul 12, 2011, at 7:28 AM, Taco Mathijs

Re: [PHP-DB] functions, the best way to implement and arrange them..

2011-07-13 Thread Karl DeSaulniers
On Jul 13, 2011, at 3:09 AM, Taco Mathijs Hillenaar-Meerveld wrote: yes, it was a structure like that i was looking for. so a class is a group of functions? i have heard about 'wrappers' to and from what i've heard it is the same thing? On Tue, Jul 12, 2011 at 11:36 PM, Karl DeSaulniers

Re: [PHP-DB] functions, the best way to implement and arrange them..

2011-07-13 Thread Gunawan Wibisono
using function is good.. I like to use it in my script.. but I do think about you should use Class because Class make your script more structure.. and you can hide your setting to make everyone unable to see or hack you system.. example.. I always like to use h1bla/h1 then i built function h1($s)

RE: [PHP-DB] how does this regular expression works

2011-07-13 Thread Shahriyar Imanov
That Regex actually has an unnecessary part to it - it would be better to write it like: /\head.*?\(?Phead_tag_innerHTML.*?)\\/head\/sim I added /m modifier, telling it that the search is performed in Multiline basis. Added head_tag_innerHTML named reference for you, so writing this Regex in

Re: [PHP-DB] functions, the best way to implement and arrange them..

2011-07-13 Thread Tamara Temple
On Jul 12, 2011, at 7:28 AM, Taco Mathijs Hillenaar-Meerveld wrote: It might be a simple question for the local die-hards among here, but i'm really wondering about how developers arrange their scripts and keep their map structures. today i was looking for the best way to keep my scripts

Re: [PHP-DB] functions, the best way to implement and arrange them..

2011-07-12 Thread Karl DeSaulniers
On Jul 12, 2011, at 7:28 AM, Taco Mathijs Hillenaar-Meerveld wrote: It might be a simple question for the local die-hards among here, but i'm really wondering about how developers arrange their scripts and keep their map structures. today i was looking for the best way to keep my scripts

Re: [PHP-DB] Duplicate table results

2011-07-06 Thread Karl DeSaulniers
I love the teddy bear effect... Corrected Code::: (or at least it works now :) (database.php) /** * getFiles - Returns all uploaded images for a print order. F * If query fails, NULL is returned. */ function getFiles($username, $fileID){ //to just get the current upload files

Re: [PHP-DB] Duplicate table results

2011-07-06 Thread Karl DeSaulniers
Hi Barry, $dbarray = array(); while($row = mysql_fetch_array($result)) { array_push($dbarray, $row['fileName']); } That was the difference. The while($row = Best, Karl On Jul 6, 2011, at 12:41 PM, Barry Stear wrote: Hmmm i didn't even see a different in the code

Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Karl DeSaulniers
Hello Stuart, After some closer look at the RFC Compliant manuals you suggested, I have determined that the creator of that code was in fact RFC821 Compliant. Being that this was a code I found several years ago, RFC822 may not have been in effect. This being the reason (I believe) that the

[PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Stuart Dallas
On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hello Stuart, After some closer look at the RFC Compliant manuals you suggested, I have determined that the creator of that code was in fact RFC821 Compliant. Being that this was a code I found several years ago,

Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Karl DeSaulniers
@Stuart Ah, then you are right that they were not compliant. The code is not that old. Thank you so much for the links and information too. Much more than I expected. I did not know that they were sent OS-Independent, but that makes perfect sense. Again, please excuse my lack of

Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-04 Thread Karl DeSaulniers
On Jul 4, 2011, at 2:34 AM, Tim Streater wrote: On 04 Jul 2011 at 08:01, Stuart Dallas stu...@3ft9.com wrote: On Mon, Jul 4, 2011 at 7:11 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hello Stuart, After some closer look at the RFC Compliant manuals you suggested, I have determined

Re: [PHP-DB] vend-bot?

2011-07-03 Thread Tamara Temple
On Jul 3, 2011, at 10:58 AM, Kirk Bailey wrote: OK, I want to send someone back from paypal to a thank you page; this reloads to the actual file they will purchase. BUT, I want to include a magic cookie that will prevent someone else from going to that url at a later time and getting the

Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Karl DeSaulniers
@Stuart, Actually that is what made me look into the PHP_EOL Stuart. Wanting to do things right. Did you not read my initial email? I am not suggesting anyone adopt my code. The question was directed to what the differences are so I COULD learn the right way. Being that this was something I

[PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Stuart Dallas
On Sun, Jul 3, 2011 at 11:22 PM, Karl DeSaulniers k...@designdrumm.comwrote: @Stuart, Actually that is what made me look into the PHP_EOL Stuart. Wanting to do things right. Did you not read my initial email? I am not suggesting anyone adopt my code. The question was directed to what the

[PHP-DB] Re: [PHP] Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-03 Thread Karl DeSaulniers
I see. Yes, I was referring to the PHP manual. I will investigate the RFC manuals as well like you had noted. No offense taken. Thank you for the clarification. Best, Karl On Jul 3, 2011, at 6:07 PM, Stuart Dallas wrote: On Sun, Jul 3, 2011 at 11:22 PM, Karl DeSaulniers k...@designdrumm.com

Re: [PHP-DB] PHP EOL

2011-07-02 Thread Karl DeSaulniers
On Jul 2, 2011, at 3:01 AM, Karl DeSaulniers wrote: Hello All, Happy pre independence for my American PHPers. And good health to all others. Have a quick question.. I have this code I use for the end of line characters used in my mailers. [Code] // Is the OS Windows or Mac or Linux if

Re: [PHP-DB] Re: [PHP] PHP EOL

2011-07-02 Thread Karl DeSaulniers
Thanks Stuart! Karl Sent from losPhone On Jul 2, 2011, at 8:45 AM, Stuart Dallas stu...@3ft9.com wrote: On Sat, Jul 2, 2011 at 9:01 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hello All, Happy pre independence for my American PHPers. And good health to all others. Have a quick

Re: [PHP-DB] A question about mysql

2011-07-01 Thread Tamara Temple
On Jun 30, 2011, at 9:57 PM, Guru™ wrote: I have a question about php-mysql. Is it possible that I can have 2 different fields in a mysql table, and when a user fill out the form for the first time the input goes to first field and when the second user fill out the form the input goes to 2nd

Re: [PHP-DB] A question about mysql

2011-06-30 Thread Karl DeSaulniers
Hi Guru, You could disable the input field or set it to readonly after it has been filled in... input type=text name=name1 value=persons name disabled=disabled / or input type=text name=name1 value=persons name readonly=readonly / but you will have to do that client side with some

Re: [PHP-DB] What is wrong with this code??

2011-06-29 Thread Zendyani
Hi list,GURU, For the first notice error, if you try to get value from post,get variable and the value is not sent or not present you have this kind of notice error, this is why you have to check for every get/post value if it's set or it's secure and you can do it with isset or empty: example:

Re: [PHP-DB] radio form submission

2011-06-24 Thread Guru™
I guess if you are storing the value of post_tptest in the database, it should return the same value what the user selected in the radio option. If I am right in your display you are just calling the data from the database. Check if the data is properly storing the radio button values in the

Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Karl DeSaulniers
Hi Chris, Here is the corrected code. Yes, call the function before the SQL SELECT like so. You may have to work with it a bit. This was just off the top of the head. But now that I look at it, I think Jim may be right. What's the purpose of the inputs having 1, 2, 3, etc and not the

Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Chris Stinemetz
Thanks everyone. If there is no purpose, I would make the values of the inputs the values you want to store in your database. Muuch easier.. So I am trying to keep this simple and just assign the value with the radio button and then insert it into mysql database, but with the following code

Re: [PHP-DB] Re: radio form submission

2011-06-24 Thread Jim Giner
The error is pretty explicit - there is no field in your table called '250kbps'. What you should have is a field (column) called speed for example, with values from 1...5 or whatever. To the users they will only deal with actual speed values on their screen if you use the speeds as the value

Re: [PHP-DB] MSsql madness

2011-06-24 Thread Paul Wilson
please remove me from this list On Fri, Jun 24, 2011 at 3:02 PM, Troy Oltmanns toltma...@gmail.com wrote: Hey php-dbers, I have a helper script that connects to an MSsql database to select retailer location information, which is then processed into mysql statements to be inserted into

Re: [PHP-DB] MSsql madness

2011-06-24 Thread Daniel Brown
On Fri, Jun 24, 2011 at 16:07, Paul Wilson paulwilso...@gmail.com wrote: please remove me from this list Email php-db-unsubscr...@lists.php.net. -- /Daniel P. Brown Network Infrastructure Manager http://www.php.net/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] radio form submission

2011-06-23 Thread Karl DeSaulniers
Try this... function getSpeed($val) { if($val != 'undefined') { switch ($val){ case 1: $post_tptest = 0-250kbps; break; case 2:

Re: [PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
On Thu, Jun 23, 2011 at 2:49 PM, Daniel P. Brown daniel.br...@parasane.net wrote: On Thu, Jun 23, 2011 at 15:46, Chris Stinemetz chrisstinem...@gmail.com wrote:    Use an if or a switch.  For example: I think your suggestions are exactly what I am looking for. I am not sure exactly where

Re: [PHP-DB] radio form submission

2011-06-23 Thread Karl DeSaulniers
I also think you need to use the mysql_free_result like so.. echo 'select name=store_mar'; while($row = mysql_fetch_assoc($result)) { echo 'option value=' .

Re: [PHP-DB] radio form submission

2011-06-23 Thread Daniel P. Brown
On Thu, Jun 23, 2011 at 15:46, Chris Stinemetz chrisstinem...@gmail.com wrote:    Use an if or a switch.  For example: I think your suggestions are exactly what I am looking for. I am not sure exactly where to place it. Do I insert it after the query statment? During your while() loop.

Re: [PHP-DB] radio form submission

2011-06-23 Thread Chris Stinemetz
   Use an if or a switch.  For example: I think your suggestions are exactly what I am looking for. I am not sure exactly where to place it. Do I insert it after the query statment? Thank you, Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] radio form submission

2011-06-23 Thread Tamara Temple
On Jun 23, 2011, at 2:32 PM, Karl DeSaulniers wrote: Try this... function getSpeed($val) { if($val != 'undefined') { switch ($val){ case 1: $post_tptest = 0-250kbps; break;

Re: [PHP-DB] radio form submission

2011-06-23 Thread Daniel P. Brown
On Thu, Jun 23, 2011 at 16:08, Chris Stinemetz chrisstinem...@gmail.com wrote: I must be missing something. I am just getting a blank page. Your help is greatly apprecieated. This is why you're supposed to take the advice and write it out yourself, not copy and paste the code. ;-P By

Re: [PHP-DB] radio form submission

2011-06-23 Thread Daniel P. Brown
On Thu, Jun 23, 2011 at 14:18, Chris Stinemetz chrisstinem...@gmail.com wrote: So far I am good on creating the form and  submitting it to mysql database and calling the submitting value from a different script. My question is: How can I make it so when a user selects radio option value 1 it

Re: [PHP-DB] ORDER BY DESC

2011-06-20 Thread Gavin Chalkley
Chris, Try this: http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html On 20 June 2011 20:56, Chris Stinemetz chrisstinem...@gmail.com wrote: I have the bellow sql query. What is the correct way to add ORDER BY posts.post_date DESC I would like to add it to the end of my query,

Re: [PHP-DB] ORDER BY DESC

2011-06-20 Thread Karl DeSaulniers
Try.. $posts_sql = SELECT posts.post_store, posts.post_content, posts.post_date, posts.post_by, users.user_id, users.user_name FROM posts LEFT JOIN users ON osts.post_by = users.user_id WHERE posts.post_store = .mysql_real_escape_string($_GET['id']). ORDER BY posts.post_date DESC;

Re: [PHP-DB] ORDER BY DESC

2011-06-20 Thread Chris Stinemetz
On Mon, Jun 20, 2011 at 3:49 PM, Karl DeSaulniers k...@designdrumm.com wrote: Try.. $posts_sql = SELECT posts.post_store, posts.post_content, posts.post_date, posts.post_by, users.user_id, users.user_name FROM posts LEFT JOIN users ON osts.post_by = users.user_id WHERE posts.post_store =

Re: [PHP-DB] A problem with pagination in PHP

2011-06-16 Thread Taco Mathijs Hillenaar-Meerveld
i have removed them and it works when i remove the $_GET on the locid and catnaam in the first query. it just loads all pictures from the whole table. but i only want the pictures that not only have that certain location id but are in that location aswell. with the query i have now it loads the

Re: [PHP-DB] problem in connecting to mysql from php

2011-06-14 Thread Niel Archer
Hello everyone, I am in the process of learning php and I was trying to connect to a mysql database on my own computer(localhost). I have done the following as prerequisites: copied the dll files in system32 removed the semicolon(;) from extension=php_mysqli.dll You should NOT need to

Re: [PHP-DB] problem in connecting to mysql from php

2011-06-14 Thread Abah Joseph
create a file with phpinfo() and make sure mysqli is listed in the loaded modules On Tue, Jun 14, 2011 at 12:07 PM, Niel Archer n...@chance.now wrote: Hello everyone, I am in the process of learning php and I was trying to connect to a mysql database on my own computer(localhost). I

<    4   5   6   7   8   9   10   11   12   13   >