Re: [PHP] insert array values

2009-03-06 Thread PJ
I've done some rethingking and this may be the direction to go: What I need to wind up with is something like this: $sql = "INSERT INTO book_categories ( book_id, category ) VALUES( '$autoID', '$categoriesID[0]' ), ( '$autoID', '$categoriesID[1]' ), ( '$autoID', '$categoriesID[2]'

Re: [PHP] insert array values

2009-03-06 Thread PJ
9el wrote: > > On Sat, Mar 7, 2009 at 5:37 AM, PJ <mailto:af.gour...@videotron.ca>> wrote: > > I've done some rethingking and this may be the direction to go: > > What I need to wind up with is something like this: > > $sql = "INSE

Re: [PHP] verify another flavor

2009-03-07 Thread PJ
Paul M Foster wrote: > On Fri, Mar 06, 2009 at 10:49:12AM -0600, haliphax wrote: > > > > >> I would go about it like this: >> >> $sql1 = "select concat_ws(' ', first_name, last_name) as Author_Name >> from author where first_name = '$first_nameIN' and last_name = >> '$last_nameIN'"; > > If you alr

Re: [PHP] insert array values

2009-03-07 Thread PJ
Jim Lucas wrote: > PJ wrote: > >> 9el wrote: >> >>> On Sat, Mar 7, 2009 at 5:37 AM, PJ >> <mailto:af.gour...@videotron.ca>> wrote: >>> >>> I've done some rethingking and this may be the direction to go: >>> &g

[PHP] assign array values to variables

2009-03-07 Thread PJ
Seems it should be simple, but how does one extract values from an array and assign them to a variable? foreach ($categoriesIN as $category) { echo "$category"; } or if(!empty($_POST['categoriesIN'])){ foreach( $_POST['categoriesIN'] as $key => $value) { echo "value = $value"; }

Re: [PHP] insert array values

2009-03-07 Thread PJ
Jim Lucas wrote: > PJ wrote: >> 9el wrote: >>> On Sat, Mar 7, 2009 at 5:37 AM, PJ >> <mailto:af.gour...@videotron.ca>> wrote: >>> >>> I've done some rethingking and this may be the direction to go: >>> >>> What

Re: [PHP] assign array values to variables

2009-03-07 Thread PJ
Jochem Maas wrote: > PJ schreef: >> Seems it should be simple, but how does one extract values from an array >> and assign them to a variable? >> foreach ($categoriesIN as $category) { > > 1. if $categoriesIN comes from a POST, use $_POST['categoriesIN'] inste

[PHP] verify data in fields

2009-03-08 Thread PJ
My mysql table contains data. But I don't know how to verify what exactly is the data... is it an array, an integer, an alphanumeric character or what? vardump($whatever) returns null; the structure of the table is no null for the column fields and has been filled like this: $autoid = 1; $test = $_

Re: [PHP] verify data in fields

2009-03-08 Thread PJ
Ashley Sheridan wrote: > On Sun, 2009-03-08 at 10:25 -0500, PJ wrote: > >> My mysql table contains data. But I don't know how to verify what >> exactly is the data... is it an array, an integer, an alphanumeric >> character or what? >> vardump($whatever) retur

Re: [PHP] insert array values

2009-03-08 Thread PJ
entries with the one that has 2 categories repeated once. What should I post to analyze the problem? Jim Lucas wrote: > PJ wrote: >> Jim Lucas wrote: >>> PJ wrote: >>> >>>> 9el wrote: >>>> >>>>> On Sat, Mar 7, 2009 at 5:37 AM, PJ

Re: [PHP] insert array values

2009-03-08 Thread PJ
Ashley Sheridan wrote: > On Sun, 2009-03-08 at 16:52 -0500, PJ wrote: > >> Well, I have everything more or less under control... just one little >> thingie... >> I was able to get everything working quite well... basically as I >> thought it should go with a little

Re: [PHP] insert array values

2009-03-08 Thread PJ
Ashley Sheridan wrote: > On Sun, 2009-03-08 at 17:52 -0500, PJ wrote: > >> Ashley Sheridan wrote: >> >>> On Sun, 2009-03-08 at 16:52 -0500, PJ wrote: >>> >>> >>>> Well, I have everything more or less under control.

[PHP] validation & inserts not working

2009-03-10 Thread PJ
Sorry to be a nuisance again, but I cannot understand why my code is not functioning correctly. I have tested the separate elements of the code and they work fine. But when I put it all together something goes off the rails. I am using sessions and cookies. After verifying that the required fields

Re: [PHP] RE: non-auto increment question

2009-03-11 Thread PJ
Ashley Sheridan wrote: > On Thu, 2009-02-26 at 11:27 -0500, PJ wrote: >> Jerry Schwartz wrote: >> >>>> Being rather new to all this, I understood from the MySql manual that >>>> the auto_increment is to b e used immediately after an insertion not >

Re: [PHP] validation & inserts not working

2009-03-11 Thread PJ
Lex Braun wrote: > PJ, > > On Tue, Mar 10, 2009 at 3:46 PM, PJ <mailto:af.gour...@videotron.ca>> wrote: > > > $sql1 = "INSERT INTO book ( title, sub_title, descr, >comment, bk_cover, copyright, ISBN, language, sellers ) >

Re: [PHP] RE: non-auto increment question

2009-03-11 Thread PJ
am resending as this was erroneously ccd to mysql. sorry! Ashley Sheridan wrote: > On Thu, 2009-02-26 at 11:27 -0500, PJ wrote: >> Jerry Schwartz wrote: >> >>>> Being rather new to all this, I understood from the MySql manual that >>>> the auto_increm

Re: [PHP] validation & inserts not working

2009-03-11 Thread PJ
Lex Braun wrote: > PJ, > > >> >> >>> $sql1 = "INSERT INTO book ( title, sub_title, descr, >>>comment, bk_cover, copyright, ISBN, language, sellers ) >>> VALUES ('$titleIN', '$sub

Re: [PHP] validation & inserts not working

2009-03-11 Thread PJ
haliphax wrote: > On Wed, Mar 11, 2009 at 4:29 PM, PJ wrote: > >> Lex Braun wrote: >> >>> PJ, >>> >>> >>> >>>> Â Â >>>> >>>> >>>>> Â Â $sql1 = "INSERT

Re: [PHP] RE: non-auto increment question

2009-03-13 Thread PJ
Jim Lucas wrote: > PJ wrote: >> am resending as this was erroneously ccd to mysql. sorry! >> >> Ashley Sheridan wrote: >>> On Thu, 2009-02-26 at 11:27 -0500, PJ wrote: >>>> Jerry Schwartz wrote: >>>> >>>>>> Being rather ne

Re: [PHP] RE: non-auto increment question

2009-03-13 Thread PJ
haliphax wrote: > On Fri, Mar 13, 2009 at 1:24 PM, PJ wrote: >> Jim Lucas wrote: >>> PJ wrote: >>>> am resending as this was erroneously ccd to mysql. sorry! >>>> >>>> Ashley Sheridan wrote: >>>>> On Thu, 2009-02-26 at 11:2

[PHP] left join does not work, why?

2009-03-14 Thread PJ
$sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- CONCAT_WS(' ', first_name, last_name) AS Author FROM book AS b LEFT JOIN book_author AS ab ON b.id = ab.bookID LEFT JOIN author AS a ON ab.authID=a.id LEFT JOIN

Re: [PHP] left join does not work, why?

2009-03-15 Thread PJ
Daniel Brown wrote: > On Sat, Mar 14, 2009 at 19:51, PJ wrote: > >> $sql1 = "SELECT b.id, b.title, b.sub_title, b.descr, b.comment, >> b.bk_cover, b.copyright, b.ISBN, b.language, b.sellers, c.publisher, <--- >> CONCAT_WS(' ', first_name, last_name

Re: [PHP] left join does not work, why?

2009-03-15 Thread PJ
Marc Christopher Hall wrote: > Not to mention if this is written for v 5 then you need to wrap your joins > in () > > -Original Message- > From: Jan G.B. [mailto:ro0ot.w...@googlemail.com] > Sent: Sunday, March 15, 2009 9:47 AM > To: PJ > Cc: Daniel Brown; p

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
Jim Lucas wrote: > PJ wrote: >> haliphax wrote: >>> On Fri, Mar 13, 2009 at 1:24 PM, PJ wrote: >>>> Jim Lucas wrote: >>>>> PJ wrote: >>>>>> am resending as this was erroneously ccd to mysql. sorry! >>>>>>

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
PJ wrote: > Jim Lucas wrote: >> PJ wrote: >>> haliphax wrote: >>>> On Fri, Mar 13, 2009 at 1:24 PM, PJ wrote: >>>>> Jim Lucas wrote: >>>>>> PJ wrote: >>>>>>> am resending as this was erroneously ccd to mysql. sorr

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
Paul M Foster wrote: > On Mon, Mar 16, 2009 at 03:46:29PM -0500, PJ wrote: > > > > >>>> $book_publisher = array(); >>>> $SQL = "SELECT id, bookID, publisher_id FROM book_publisher"; >>>> if ( ( $results = mysql_query($SQL, $db) )

Re: [PHP] RE: non-auto increment question

2009-03-16 Thread PJ
Paul M Foster wrote: > On Mon, Mar 16, 2009 at 06:05:33PM -0500, PJ wrote: > >> Paul M Foster wrote: > > > >> Thanks Paul for the explanation. It really does help and iis much >> appreciated. >> >> I must respond to your chastisement of me, because

[PHP] assign associative array values to variables?

2009-03-17 Thread PJ
I have been tearing out my hair to figure out a way to place array values into $variables with not much luck. I can echo the array to the screen but I can not manipulate the results. I have searched wide and far all day on the web and I find nothing that points the way how to extract values from an

[PHP] preg_replace() question

2009-03-17 Thread PJ
1. What is the overhead on preg_replace? 2. Is there a better way to strip spaces and non alpha numerical characters from text strings? I suspect not... maybe the Shadow does ??? :-D -- unheralded genius: "A clean desk is the sign of a dull mind. "

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread PJ
Chris wrote: > PJ wrote: >> I have been tearing out my hair to figure out a way to place array >> values into $variables with not much luck. I can echo the array to the >> screen but I can not manipulate the results. >> I have searched wide and far all day on the

Re: [PHP] assign associative array values to variables?

2009-03-17 Thread PJ
ory] => Another category) So, you see, I can't do anything with that. I had hoped to be able to use something like count() or $row() or foreach or while but no go. foreach may have a possibility but it it rather convoluted and I'm trying to avoid it; hoping for something simpler, more l

Re: [PHP] assign associative array values to variables? SOLVED

2009-03-18 Thread PJ
dg wrote: > > On Mar 17, 2009, at 6:47 PM, PJ wrote: > >> The problem is that the $array returns another array (multidimensional >> and associative ?? ) > > > $array_branch_one = array("value_one" => "red", "value_two" => "bl

Re: [PHP] assign associative array values to variables? SOLVED

2009-03-20 Thread PJ
Ford, Mike wrote: > On 18 March 2009 13:21, PJ advised: > > >> Thank you, once again, dg. Could not get it to work... whatever... >> But I did find an unexpected solution which made things very simple. >> This is the part for the categories section: >> >&g

[PHP] similar page replication

2009-03-26 Thread PJ
I have a series of pages to display that are all exactly the same, except for a couple of small changes like 1 number that needs to be changed for a mysql_query, the title of the page, and the page_name.php. I am wondering how these changes could be implemented when clicking on an href link? Is the

[PHP] hierarchies

2009-03-27 Thread PJ
I do have a bit of a problem which has not been clearly explained in the suggestions to my previous posts and that is the question of hierarchies. I have not yet understood how to include a file anywhere in a directory tree and have it point to the right file which may be in the top directory or, m

Re: [PHP] hierarchies

2009-03-27 Thread PJ
Jason Pruim wrote: > > > PJ wrote: >> I do have a bit of a problem which has not been clearly explained in >> the suggestions to my previous posts and that is the question of >> hierarchies. I have not yet understood how to include a file anywhere in >> a direct

[PHP] formulate nested select

2009-03-30 Thread PJ
I cannot find anything on google or the manuals/tutorials that gives some kin of clear explanation of how to so nested selects with where or whatever. I have three tables: books, authors and book-authors. I need to retrieve only those books whose author's names begin with A. I have tried several ma

Re: [PHP] formulate nested select

2009-03-31 Thread PJ
Jim Lucas wrote: > Chris wrote: >> PJ wrote: >>> I cannot find anything on google or the manuals/tutorials that gives >>> some kin of clear explanation of how to so nested selects with where or >>> whatever. >>> I have three tables: books, authors

Re: [PHP] formulate nested select

2009-03-31 Thread PJ
e be some inconsistency in the tables, like skipped records or a record in a column that is non-existent in a corresponding column? Jim Lucas wrote: > Chris wrote: >> PJ wrote: >>> I cannot find anything on google or the manuals/tutorials that gives >>> some kin of clear exp

Re: [PHP] formulate nested select

2009-03-31 Thread PJ
Ian wrote: > On 31 Mar 2009 at 9:08, PJ wrote: > > >> I must be doing something wrong. Can't figure it out even though I've >> been searching the manuals & tutorials, it still does not work. Here is >> the exact code that I have tried; the first versi

Re: [PHP] formulate nested select

2009-03-31 Thread PJ
;ll try to figure something out, but as somebody not too optimistic once said: "it sure don't look too good" (American, I believe...) :-) > Jim Lucas wrote: >> Chris wrote: >>> PJ wrote: >>>> I cannot find anything on google or the manuals/tutorials tha

Re: [PHP] formulate nested select

2009-03-31 Thread PJ
DER BY "title" as that does not require another effort. Any thoughts or suggestions? > > > > > > -Original Message- > From: PJ [mailto:af.gour...@videotron.ca] > Sent: Tuesday, March 31, 2009 2:06 PM > To: Jim Lucas > Cc: Chris; php-general@lists.php.n

Re: [PHP] formulate nested select

2009-03-31 Thread PJ
haliphax wrote: > On Tue, Mar 31, 2009 at 5:15 PM, PJ wrote: >> kyle.smith wrote: >>> What about using "IN", something like: >>> >>> SELECT * FROM book WHERE id IN (SELECT bookID FROM book_authors WHERE >>> authID IN (SELECT author.id FROM a

[PHP] & and && and weird results

2009-04-01 Thread PJ
I hope somebody can make sense of this. First, I don't understand what the difference is supposed to be between & and && - is there a difference for php and/or mysql? Second, I am trying to select all occurrences in a table.column where the first letter of the name is I, J, or K but not I or J or K

Re: [PHP] & and && and weird results

2009-04-01 Thread PJ
Kyle Smith wrote: > Kyle Smith wrote: >> PJ wrote: >>> I hope somebody can make sense of this. >>> First, I don't understand what the difference is supposed to be between >>> & and && - is there a difference for php and/or mysql? >>> S

Re: [PHP] & and && and weird results NOT solved but FIXED ....

2009-04-01 Thread PJ
PJ wrote: > Kyle Smith wrote: > >> Kyle Smith wrote: >> >>> PJ wrote: >>> >>>> I hope somebody can make sense of this. >>>> First, I don't understand what the difference is supposed to be between >>>> &

Re: [PHP] & and && and weird results

2009-04-01 Thread PJ
Lex Braun wrote: > PJ, > > On Wed, Apr 1, 2009 at 1:40 PM, PJ <mailto:af.gour...@videotron.ca>> wrote: > > SELECT * FROM book >WHERE id IN (SELECT bookID >FROM book_author WHERE authID IN (SELECT author.id > <http://author.id&

[PHP] concat and join stuff

2009-04-03 Thread PJ
Here some code that works fine, but... "SELECT b.*, c.publisher, CONCAT_WS(' ', first_name, last_name) AS Author FROM book AS b LEFT JOIN book_publisher as abc ON b.id = abc.bookID LEFT JOIN publishers AS c ON abc.publishers_id = c.id LEFT JOIN book_author AS

[PHP] difficult select problem

2009-04-06 Thread PJ
I've searched the web, the tutorials, etc. with no luck and have asked on MySql list with no luck and have even posted here with no replies. So, let's try again: I am trying to limit the search for books to only those that start with "A" (does not have to be case sensitive); but within that select

Re: [PHP] difficult select problem

2009-04-06 Thread PJ
results 2) find and echo the second author. So far, I have not been able to figure out how to go about that without a lot of queries. Bastien Koert wrote: > > > On Mon, Apr 6, 2009 at 12:32 PM, PJ <mailto:af.gour...@videotron.ca>> wrote: > > I've searched the web

Re: [PHP] difficult select problem

2009-04-06 Thread PJ
below: Lex Braun wrote: > PJ, > On Mon, Apr 6, 2009 at 12:32 PM, PJ <mailto:af.gour...@videotron.ca>> wrote: > > I am trying to limit the search for books to only those that start > with > "A" (does not have to be case sensitive); but within that

Re: [PHP] difficult select problem

2009-04-07 Thread PJ
Gentlemen, First, let me thank you all for responding and offering suggestions. I appreciate it and I am learning things. However, it looks like my message is not getting across: The problem is not to retrieve only the authors whose last names begin with A: 1) which books have a second author? 2)

Re: [PHP] difficult select problem

2009-04-07 Thread PJ
Bob McConnell wrote: > From: PJ >> First, let me thank you all for responding and offering suggestions. I >> appreciate it and I am learning things. >> However, it looks like my message is not getting across: >> The problem is not to retrieve only the authors whose

Re: [PHP] difficult select problem

2009-04-08 Thread PJ
Hi Jim, Sorry I could not gat back to you on your suggestion. I've been under the weather for a couple of days but am almost over it. Your suggestion does not work... yet. I'll insert comments & questions below... Jim Lucas wrote: > PJ wrote: >> I've searched the web,

Re: [PHP] difficult select problem

2009-04-09 Thread PJ
Jim Lucas wrote: > PJ wrote: >> Hi Jim, >> Sorry I could not gat back to you on your suggestion. I've been under >> the weather for a couple of days but am almost over it. >> Your suggestion does not work... yet. >> I'll insert comments & questio

Re: [PHP] difficult select problem

2009-04-09 Thread PJ
d, it is not important what follows the A I think I understand the AS book_id and AS auth_id - is it to avoid confusion with the book.id and author.id? Anyway, I am beginning to see more light - could it be called enLIGHTenment? :-D Jim Lucas wrote: > PJ wrote: >> Gentlemen, >>

Re: [PHP] difficult select problem

2009-04-09 Thread PJ
Andrew Ballard wrote: > On Thu, Apr 9, 2009 at 1:39 PM, PJ wrote: > [snip] > >> Now the silly questions = often I am curious what effect the differences >> in code will have on performance. >> For instance, why are you using author.last_name LIKE '{$Auth}%'

[PHP] unknown number of inputs

2009-04-09 Thread PJ
I have a script with $_POST and to load data with text input. Situation: enter name of author(s) for book. I have the script set up to enter first_name, last_name for Author1 and the same for Author 2. Check if entry 1 exists then proceed accordingly Check if entry 2 exists then proceed accordingl

Re: [PHP] Re: unknown number of inputs

2009-04-10 Thread PJ
Michael A. Peters wrote: > Phpster wrote: >> >> >> On Apr 10, 2009, at 12:44, Al wrote: >> >>> >>> PJ wrote: >>>> I have a script with $_POST and to load data with text input. >>>> Situation: enter name of author(s) for book.

[PHP] extract varying data from array with different formatting

2009-04-11 Thread PJ
foreach does a nice job if you want the results identical each time. What can you use to change the formatting of the results dependent on the number of results. Here's an example: foreach ( $authors[$bookID] AS $authorID => $authorData ) { # Display the echo "{$auth

[PHP] what to use instead of foreach

2009-04-12 Thread PJ
foreach does not allow for different formatting for output... What could be used as a workaround? example: echo $some_result, ""; // will print all results in 1 column echo $some_result, ","; // will print all results comma-separated in 1 row But how do you get result1, result2 & result3 // with

Re: [PHP] what to use instead of foreach

2009-04-13 Thread PJ
Mark Kelly wrote: > Hi. > > On Sunday 12 April 2009, PJ wrote: > >> foreach does not allow for different formatting for output... >> > > [snip] > > >> But how do you get result1, result2 & result3 // with at end ? >> > &g

Re: [PHP] what to use instead of foreach

2009-04-13 Thread PJ
2 > /* you may add checks here to see if $a contains data */ > echo " ~ $a ~ "; $a = next($my_array); > > //Format 3 + NEW LINE > /* you may add checks here to see if $a contains data */ > echo " ~~ $a ~~ "; > } > > This way you have some added control

Re: [PHP] what to use instead of foreach

2009-04-13 Thread PJ
have a go at it if I'm to learn anything. I already have a ranking column set up but am not using it at the moment for the author display. Anyway, I have enough to keep my neurons busy for a while. Thanks. Leon du Plessis wrote: > Hi PJ, > > You may want to remove the "," b

Re: [PHP] extract varying data from array with different formatting

2009-04-14 Thread PJ
Jim Lucas wrote: > PJ wrote: >> Jim Lucas wrote: >>> PJ wrote: >>>> foreach does a nice job if you want the results identical each time. >>>> What can you use to change the formatting of the results dependent on >>>> the number of results. &

Re: [PHP] what to use instead of foreach

2009-04-14 Thread PJ
Leon du Plessis wrote: > Hi PJ, > > Maybe you should post your code, or portion thereof. The trained eyes on the > list will quickly gather where the problem in the logic lies. > > Maybe you can also sacrifice some of your data or data structures if not too > sensitive. This

[PHP] count() total records for pagination with limit

2009-04-14 Thread PJ
I seem to recall that it is possible to count all instances of a query that is limited by $RecordsPerPage without repeating the same query. I believe that COUNT() had to called immediately after the SELECT word but I neglected to bookmark the source. Dummy! I don't like the idea of count(*) over co

Re: [PHP] what to use instead of foreach

2009-04-14 Thread PJ
Mark Kelly wrote: > Hi Phil. > > On Monday 13 April 2009, PJ wrote: > >> Thanks for the suggestion, Mark. I've already experimented with count; >> you're close, but there is still a small glitch and that's in count(); >> foreach doesn't giv

Re: [PHP] count() total records for pagination with limit

2009-04-14 Thread PJ
Chris wrote: > PJ wrote: >> I seem to recall that it is possible to count all instances of a query >> that is limited by $RecordsPerPage without repeating the same query. I >> believe that COUNT() had to called immediately after the SELECT word but >> I neglected to

[PHP] array manipulation

2009-04-16 Thread PJ
The more I get into arrays, the less I understand. I have a ridiculously simple task which excapes me completely. I need to ouput all fields in 1 column from 1 table in two phases sorted alphabetically. So, I have the query, I have the results. But since I need to split the list into 2 parts, I nee

Re: [PHP] array manipulation

2009-04-16 Thread PJ
Sorry, bout that. My brain wasn't working right. It was a lot simpler than I thought. Forget the foreach. I used a counter. :-[ PJ wrote: > The more I get into arrays, the less I understand. > I have a ridiculously simple task which excapes me completely. > I need to ouput all fiel

Re: [PHP] escape your variables

2009-04-20 Thread PJ
Bastien Koert wrote: > On Wed, Feb 18, 2009 at 8:34 AM, PJ wrote: > > >> To focus on mysql_real_escape_string, I am recapping... questions below >> QUOTE:== >> Instead of doing this (for an imaginary table): >> $sql = "insert into table1(field

[PHP] collation

2009-04-21 Thread PJ
I am getting some weird results on some pages output to browser. Many of the listings on the site are in different languages (English, French, Spanish, German, Portugese, Swedish and Italian) - Some author's names are in those languages and some comments or reviews as well. That means that some of

[PHP] re: Collation - Solved

2009-04-21 Thread PJ
Ok, here's where we see a problem with html sanitization. This was the guilty party: $aList = array_map('htmlspecialchars', $aList); Once commented out & deleted, things are back to normal. :-\ -- unheralded genius: "A clean desk is the sign of a dull mind. " -

[PHP] checkboxes

2009-04-21 Thread PJ
How to deactivate checkboxes when one in a series is checked? So that only 1 of the other inputs could be used in a search. Probably do the rest with switch stuff. Would be neat if the deactivated checkboxes would go grey. Is this an HTML question? Use onclick?But I think I need to either use a

Re: [PHP] Re: checkboxes

2009-04-21 Thread PJ
Ashley Sheridan wrote: > On Wed, 2009-04-22 at 07:17 +0530, kranthi wrote: >> yeh an onclick event handler is required to achieve this. but as Shawn >> has suggested radio buttons are better in this case. >> >> but then again if u want to disable/greyout the other input(like >> textboxes, other tha

Re: [PHP] Re: checkboxes

2009-04-21 Thread PJ
PJ wrote: > Ashley Sheridan wrote: > >> On Wed, 2009-04-22 at 07:17 +0530, kranthi wrote: >> >>> yeh an onclick event handler is required to achieve this. but as Shawn >>> has suggested radio buttons are better in this case. >>> >>>

Re: [PHP] Re: checkboxes

2009-04-22 Thread PJ
Ashley Sheridan wrote: > On Wed, 2009-04-22 at 01:38 -0400, PJ wrote: > >> Ashley Sheridan wrote: >> >>> On Wed, 2009-04-22 at 07:17 +0530, kranthi wrote: >>> >>>> yeh an onclick event handler is required to achieve this. but as Shaw

Re: [PHP] checkboxes

2009-04-22 Thread PJ
Lists wrote: > PJ wrote: >> How to deactivate checkboxes when one in a series is checked? >> >> >> >> >> So that only 1 of the other inputs could be used in a search. Probably >> do the rest with switch stuff. >> Would be neat if the deact

[PHP] @$_POST[...]

2009-04-22 Thread PJ
Could somebody explain to me the meaning of @ in $var = @$_POST['title'] ; where could I find a cheat sheet for those kinds of symbols or what are they called? Sorry for my ignorance, but maybe this will take the fog filter our of my neurons. :-\ -- unheralded genius: "A clean desk is the sign of

Re: [PHP] @$_POST[...]

2009-04-22 Thread PJ
9el wrote: > Rather than looking for cheatsheets you should read the ZCE > preparation guide book and PHP manual. > > That's a lame duck response. I'm not stupid enough to not search and try to find answers on G and in the manuals & tutorials. They are not always obvious so I often rely on the g

Re: [PHP] checkboxes

2009-04-23 Thread PJ
tedd wrote: > At 5:33 PM -0400 4/22/09, PJ wrote: >> Well, I'm making a page to do limited searching of the database. To keep >> it simple I just want to search by title, author, ISBN or copyright >> date. So, I need to input the user's choice, limit it to one

Re: [PHP] checkboxes

2009-04-23 Thread PJ
tedd wrote: > At 10:11 AM -0400 4/23/09, PJ wrote: >> tedd wrote: >> > http://php1.net/a/edit-db-demo/ >>> >>> Here a user can search for a Last name, first name, or email. Note, >>> there's no checkboxes because the user indicates what the

Re: [PHP] @$_POST[...]

2009-04-23 Thread PJ
Chris wrote: > Luke wrote: >> 2009/4/22 PJ >> >>> Could somebody explain to me the meaning of @ in $var = >>> @$_POST['title'] ; >>> where could I find a cheat sheet for those kinds of symbols or what are >>> they called? >>>

Re: [PHP] checkboxes

2009-04-23 Thread PJ
PJ wrote: > tedd wrote: > >> At 10:11 AM -0400 4/23/09, PJ wrote: >> >>> tedd wrote: >>> > http://php1.net/a/edit-db-demo/ >>> >>>> Here a user can search for a Last name, first name, or email. Note, >>

Re: [PHP] checkboxes

2009-04-23 Thread PJ
PJ wrote: > tedd wrote: > >> At 10:11 AM -0400 4/23/09, PJ wrote: >> >>> tedd wrote: >>> > http://php1.net/a/edit-db-demo/ >>> >>>> Here a user can search for a Last name, first name, or email. Note, >>

Re: [PHP] checkboxes

2009-04-24 Thread PJ
Lists wrote: > tedd wrote: >> At 4:58 PM -0400 4/23/09, PJ wrote: >>> >>> >>> tedd wrote: >>> >>> > http://php1.net/a/edit-db-demo/ >>> >>> >>> >H I've looked at your demo and, frankly, don&

[PHP] inexplicable behaviour

2009-04-24 Thread PJ
Frankly, I don't know what to look for or why something so weird would happen: I have pagination set up and the number for pages "next" has a link but the "next" does not. I have experimented with all sorts of configurations of the code but the only thing that works (and this is totally "off the wa

Re: RES: [PHP] inexplicable behaviour

2009-04-25 Thread PJ
ny instances of $Count1 were commented out. I suspect it may have something to do with sessions or with some stack stuff but I really have no idea. Thanks for your interest. Phil Jônatas Zechim wrote: > Is the $Count++.. > > -Mensagem original- > De: PJ [mailto:af.gour...@vide

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread PJ
9el wrote: > I have pagination set up and the number for pages "next" has a link but > the "next" does not. I have experimented with all sorts of > configurations of the code but the only thing that works (and this is > totally "off the wall") is to do this > *$Count* = *mysql_num_rows($results);*

Re: RES: [PHP] inexplicable behaviour SOLVED

2009-04-26 Thread PJ
kranthi wrote: > if $Count1 is never referenced after this, then certainly this > assignment operation is redundent. but assignment is not the ONLY > operation of this statement. if u hav not noticed a post increment > operator has been used which will affect the value of $Count as well, > and this

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread PJ
> Look for "Pagination with PHP + MySQL" and watchit > > > http://www.google.com/url?sa=t&source=web&ct=res&cd=10&url=http%3A%2F%2Fwww.bestechvideos.com%2F2008%2F07%2F02%2Fsampsonvideos-php-pagination-part-2&ei=ohn0SdnlL8KLkAWQrNTbCg&usg=AFQjCNEGKOIG3791BpgeVqCiiq5-cikbRA > > Dont miss this Sampso

Re: RES: [PHP] inexplicable behaviour

2009-04-26 Thread PJ
Phpster wrote: > What parameters are you pasing in the link? That will be the telling > point of what you are doing wrong. You could pass the search params ( > though these are best kept in a session or cookie ) and the offset > counter to get the next block of results. Actually, I am trying to use

Re: RES: [PHP] inexplicable behaviour SOLVED

2009-04-27 Thread PJ
Ford, Mike wrote: > On 26 April 2009 22:59, PJ advised: > > >> kranthi wrote: >> >>> if $Count1 is never referenced after this, then certainly this >>> assignment operation is redundent. but assignment is not the ONLY >>> operation of this

[PHP] utf-8 ?

2009-04-27 Thread PJ
Since I have to use a number of Western languages that have those annoying accents on many characters, I am already finding some annoyances in my code results; like having to enter the á type of stuff in inputs for searches & queries. MySql db is set up for InnoDB with latin1_swedish_ci for Collati

[PHP] Re: utf-8 ?

2009-04-27 Thread PJ
Nathan Rixham wrote: > PJ wrote: >> Since I have to use a number of Western languages that have those >> annoying accents on many characters, I am already finding some >> annoyances in my code results; like having to enter the á type of >> stuff in inputs for searches &a

[PHP] Re: utf-8 ?

2009-04-27 Thread PJ
9el wrote: > > I looked at http://developer.loftdigital.com/blog/php-utf-8-cheatsheet > which suggests this: > ALTER DATABASE db_name > CHARACTER SET utf8 > DEFAULT CHARACTER SET utf8 > COLLATE utf8_general_ci > DEFAULT COLLATE utf8_general_ci > ; > > ALTER TABLE

Re: [PHP] utf-8 ?

2009-04-27 Thread PJ
Tom Worster wrote: > On 4/27/09 9:55 AM, "PJ" wrote: > >> Since I have to use a number of Western languages that have those >> annoying accents on many characters, I am already finding some >> annoyances in my code results; like having to enter the á type

Re: [PHP] utf-8 ?

2009-04-27 Thread PJ
Tom Worster wrote: > On 4/27/09 4:25 PM, "PJ" wrote: > > >> Exactly what are the advantages of using utf-8? How will it solve my >> problem? >> > > actually, i have no idea because i have no idea what problem you are trying > to solve and i a

Re: RES: [PHP] inexplicable behaviour SOLVED

2009-04-28 Thread PJ
Ford, Mike wrote: > On 27 April 2009 14:21, PJ advised: > > >> Ford, Mike wrote: >> >>> On 26 April 2009 22:59, PJ advised: >>> >>> >>> >>>> kranthi wrote: >>>> >>>> >>>>

<    1   2   3   4   >