Re: [PHP] select function

2012-10-25 Thread Daniel Brown
On Thu, Oct 25, 2012 at 5:35 PM, Jeff Burcher j...@allredmetal.com wrote: Hi, I can't remember if this is the PHP list for RPG programmers or not, so apologize if this is the wrong one. This is just a general PHP mailing list. Guessing you need the other one. -- /Daniel P. Brown

Re: [PHP] select function

2012-10-25 Thread Stuart Dallas
On 25 Oct 2012, at 22:35, Jeff Burcher j...@allredmetal.com wrote: I can't remember if this is the PHP list for RPG programmers or not, so apologize if this is the wrong one. Not an RPG list, but your question is PHP-related more than it's RPG-related. Is there an equivalent command in PHP

RE: [PHP] select function

2012-10-25 Thread Ford, Mike
-Original Message- From: Stuart Dallas [mailto:stu...@3ft9.com] Sent: 25 October 2012 22:48 Aw, nuts! Stuart, you just beat me to it! I was half way through writing an almost identical post when yours popped into my Inbox Cheers! Mike -- Mike Ford, Electronic Information

Re: [PHP] SELECT AVG(rating)

2010-07-02 Thread Ashley Sheridan
On Fri, 2010-07-02 at 14:32 -0600, Ben Miller wrote: Hi - I have a MySQL table full of product reviews and I'm trying to select info for only the top 5 rated products. The only way I can figure out how to do it so far is something like: $query1 = mysql_query(SELECT * FROM products);

RE: [PHP] SELECT AVG(rating)

2010-07-02 Thread Ben Miller
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Friday, July 02, 2010 2:43 PM To: b...@tottd.com Cc: php-general@lists.php.net Subject: Re: [PHP] SELECT AVG(rating) On Fri, 2010-07-02 at 14:32 -0600, Ben Miller wrote: Hi - I have a MySQL table full

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-31 Thread tedd
At 7:23 PM -0400 5/30/10, Alice Wei wrote: Tedd, Looks like I finally found the answer to my question, and the key is the term, dependent drop down menu. There is an example that I found here, http://www.huanix.com/files/dependent_select/dependent_select.txt, and after editing everything,

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-31 Thread Alice Wei
Date: Mon, 31 May 2010 11:56:38 -0400 To: php-general@lists.php.net; aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 7:23 PM -0400 5/30/10, Alice Wei wrote: Tedd, Looks like I finally found

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-30 Thread tedd
At 12:08 PM -0400 5/29/10, Alice Wei wrote: At the time of writing this, I got all the functionality I wanted, only that it takes 3 submits, which is 4 pages in total, which includes two dependent select menus based on user input by clicking on the radio button and some other static drop

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-30 Thread Alice Wei
Date: Sun, 30 May 2010 11:53:44 -0400 To: php-general@lists.php.net; aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 12:08 PM -0400 5/29/10, Alice Wei wrote: At the time of writing this, I got all

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-29 Thread tedd
At 7:31 PM -0400 5/28/10, Alice Wei wrote: Anything I want? Seriously, I do know how to pass a non-dynamic element from one page to another page, but when I started researching on how to utilize dynamic menus based on user input, I found Ajax, until this problem that I am running into hits

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-29 Thread Alice Wei
Date: Sat, 29 May 2010 11:50:50 -0400 To: php-general@lists.php.net; aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 7:31 PM -0400 5/28/10, Alice Wei wrote: Anything I want? Seriously, I do know

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread tedd
At 9:19 PM -0400 5/27/10, Alice Wei wrote: I am not sure how to add to the page you have set up, but here is the code with ther portion you have set up: ?php $start = isset($_POST['start']) ? $_POST['start'] : null; ? form action= method=post p Select the type of your

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Alice Wei
Date: Fri, 28 May 2010 12:34:55 -0400 To: aj...@alumni.iu.edu; php-general@lists.php.net From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 9:19 PM -0400 5/27/10, Alice Wei wrote: I am not sure how to add to the page

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Ashley Sheridan
On Fri, 2010-05-28 at 15:00 -0400, Alice Wei wrote: Date: Fri, 28 May 2010 12:34:55 -0400 To: aj...@alumni.iu.edu; php-general@lists.php.net From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 9:19 PM -0400 5/27/10

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Alice Wei
Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: tedd.sperl...@gmail.com; php-general@lists.php.net Date: Fri, 28 May 2010 20:05:29 +0100 On Fri, 2010-05-28 at 15:00 -0400, Alice Wei wrote

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Ashley Sheridan
On Fri, 2010-05-28 at 15:12 -0400, Alice Wei wrote: Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: tedd.sperl...@gmail.com; php-general@lists.php.net Date: Fri, 28 May 2010 20:05:29 +0100 On Fri

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Alice Wei
Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: a...@ashleysheridan.co.uk To: aj...@alumni.iu.edu CC: tedd.sperl...@gmail.com; php-general@lists.php.net Date: Fri, 28 May 2010 20:14:06 +0100 On Fri, 2010-05-28 at 15:12 -0400, Alice Wei wrote

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread tedd
On Fri, 2010-05-28 at 15:12 -0400, Alice Wei wrote: What I am trying to find out is, when I have my form with a dependent select menu, how can I pass the value of the select menu to another page? I have mentioned in the initial email that if I just allow users to type stuff, it passes the

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Alice Wei
Date: Fri, 28 May 2010 17:18:21 -0400 To: aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms CC: php-general@lists.php.net On Fri, 2010-05-28 at 15:12 -0400, Alice Wei wrote: What I am trying to find out

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Alice Wei
From: aj...@alumni.iu.edu To: tedd.sperl...@gmail.com CC: php-general@lists.php.net Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms Date: Fri, 28 May 2010 19:31:10 -0400 Date: Fri, 28 May 2010 17:18:21 -0400 To: aj...@alumni.iu.edu From: tedd.sperl

Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-28 Thread Adam Richardson
On Fri, May 28, 2010 at 8:01 PM, Alice Wei aj...@alumni.iu.edu wrote: From: aj...@alumni.iu.edu To: tedd.sperl...@gmail.com CC: php-general@lists.php.net Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms Date: Fri, 28 May 2010 19:31:10 -0400 Date

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-27 Thread tedd
At 3:50 PM -0400 5/26/10, Alice Wei wrote: My bad, I cannot imagine I sent that stuff. To answer your question, here it is, form action= method=post pSelect the type of your starting point of interest:br/ input type=text name=start

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-27 Thread Alice Wei
Date: Thu, 27 May 2010 12:23:46 -0400 To: aj...@alumni.iu.edu; php-general@lists.php.net From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 3:50 PM -0400 5/26/10, Alice Wei wrote: My bad, I cannot imagine I sent that stuff

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread Alice Wei
On Tue, 2010-05-25 at 15:41 -0400, Alice Wei wrote: Date: Tue, 25 May 2010 13:40:44 -0400 Subject: Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: marc.g...@gmail.com To: aj...@alumni.iu.edu I would like to take those values away into my third form, which

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread Ashley Sheridan
On Wed, 2010-05-26 at 08:28 -0400, Alice Wei wrote: On Tue, 2010-05-25 at 15:41 -0400, Alice Wei wrote: Date: Tue, 25 May 2010 13:40:44 -0400 Subject: Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: marc.g...@gmail.com To: aj...@alumni.iu.edu I

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread Bob McConnell
From: Alice Wei On Tue, 2010-05-25 at 15:41 -0400, Alice Wei wrote: Date: Tue, 25 May 2010 13:40:44 -0400 Subject: Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: marc.g...@gmail.com To: aj...@alumni.iu.edu I would like to take those values away into my

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread tedd
At 9:17 PM -0400 5/25/10, Alice Wei wrote: No, the fields are populated in the first and second form, form1 and form2. What I want to do is to get the selections from both forms and pass them on to the third. Does this make sense? For some reason, the text input and the semester drop down menu

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread Alice Wei
Date: Wed, 26 May 2010 09:19:26 -0400 To: php-general@lists.php.net; aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms At 9:17 PM -0400 5/25/10, Alice Wei wrote: No, the fields are populated in the first

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread tedd
Alice: You provide: ul form action= method=post liSelect the type of your starting point of interest:br/ div id=start_menuform action=test_getrss.php name=form1 method=post spaninput

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread Alice Wei
Date: Wed, 26 May 2010 15:36:18 -0400 To: php-general@lists.php.net; aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms Alice: You provide: ul form action= method=post liSelect the type of your

Re: [PHP] Select Values Didn't Get Passed in From Two DifferentForms

2010-05-26 Thread Al
On 5/26/2010 3:50 PM, Alice Wei wrote: Date: Wed, 26 May 2010 15:36:18 -0400 To: php-general@lists.php.net; aj...@alumni.iu.edu From: tedd.sperl...@gmail.com Subject: RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms Alice: You provide: ul form action= method=post

Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-26 Thread Nisse Engström
On Wed, 26 May 2010 11:02:10 -0400, Alice Wei wrote: [De-indented to preserve sanity] ul form action= method=post Bzzt. Only li elements can be children of ul. liSelect the type of your starting point of interest:br/ div id=start_menu form action=test_getrss.php name=form1

Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-25 Thread Alice Wei
Date: Tue, 25 May 2010 13:40:44 -0400 Subject: Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms From: marc.g...@gmail.com To: aj...@alumni.iu.edu I would like to take those values away into my third form, which is what you see with the hidden

RE: [PHP] Select Values Didn't Get Passed in From Two Different Forms

2010-05-25 Thread Edwin
, Edwin. -Original Message- From: Adam Richardson [mailto:simples...@gmail.com] Sent: Wednesday, May 26, 2010 1:31 AM To: php-general@lists.php.net Subject: Re: [PHP] Select Values Didn't Get Passed in From Two Different Forms On Tue, May 25, 2010 at 1:17 PM, Alice Wei aj...@alumni.iu.edu

Re: [PHP] Select and compare problems still ...

2009-07-01 Thread Phpster
On Jul 1, 2009, at 10:56 AM, Miller, Terion tmil...@springfi.gannett.com wrote: Why doesn't this work? $query = SELECT * FROM `restaurants` WHERE name ='$ucName' AND address = '$ucAddress' ; $result = mysql_query($query) or die(mysql_error()); echo $result; $row =

Re: [PHP] Select and compare problems still ...

2009-07-01 Thread Andrew Ballard
On Wed, Jul 1, 2009 at 10:56 AM, Miller, Teriontmil...@springfi.gannett.com wrote: Why doesn't this work?    $query = SELECT * FROM `restaurants` WHERE name ='$ucName' AND address = '$ucAddress'   ; $result = mysql_query($query) or die(mysql_error());  echo $result;     $row =

Re: [PHP] Select and compare problems still ...

2009-07-01 Thread Miller, Terion
On 7/1/09 10:06 AM, Phpster phps...@gmail.com wrote: On Jul 1, 2009, at 10:56 AM, Miller, Terion tmil...@springfi.gannett.com wrote: Why doesn't this work? $query = SELECT * FROM `restaurants` WHERE name ='$ucName' AND address = '$ucAddress' ; $result = mysql_query($query)

Re: [PHP] Select and compare problems still ...

2009-07-01 Thread Andrew Ballard
On Wed, Jul 1, 2009 at 11:23 AM, Andrew Ballardaball...@gmail.com wrote: On Wed, Jul 1, 2009 at 10:56 AM, Miller, Teriontmil...@springfi.gannett.com wrote: Why doesn't this work?    $query = SELECT * FROM `restaurants` WHERE name ='$ucName' AND address = '$ucAddress'   ; $result =

Re: [PHP] Select List/Menu

2009-04-17 Thread Richard Heyes
in VBSCRIPT In what? Use [] at the end of your selects name: select name=mySelect[] ... /select -- Richard Heyes HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari: http://www.rgraph.net (Updated April 11th) -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Select Query with Multiple Optional Values

2009-03-22 Thread Robert Cummings
On Sun, 2009-03-22 at 09:22 +0800, Virgilio Quilario wrote: Trying to find best way to accomplish following scenario. Looking to search inventory through a POST form, have the following optional fields to search by: Product Name, Color, Size, and Status. Search maybe for the Product

Re: [PHP] Select Query with Multiple Optional Values

2009-03-21 Thread Robert Cummings
On Sat, 2009-03-21 at 10:30 -0700, ben...@gmail.com wrote: Trying to find best way to accomplish following scenario. Looking to search inventory through a POST form, have the following optional fields to search by: Product Name, Color, Size, and Status. Search maybe for the Product Name

Re: [PHP] Select Query with Multiple Optional Values

2009-03-21 Thread Virgilio Quilario
Trying to find best way to accomplish following scenario.  Looking to search inventory through a POST form, have the following optional fields to search by: Product Name, Color, Size, and Status.  Search maybe for the Product Name and/or Color or they may search for just the Color or all 4

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Yeti
How should I proceed? Thanks in advance for any suggestions. Since you are looping through the result already, why not do it this way .. $combinedArray = array(); for ($i=0;$icount($myArray);$i++) { $sql = SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]'); $result =

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Yeti
Correcting myself now .. $myArray = array('b2005', 'b2008'); $sql = SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]'); $result = mysql_query($sql); if(mysql_num_rows($result) 0) { while ($myrow = mysql_fetch_array($result)) { if (in_array($myrow['study'], $myArray))

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Andrej Kastrin
Thanks Yeti, it works. Best, Andrej Yeti wrote: Correcting myself now .. $myArray = array('b2005', 'b2008'); $sql = SELECT study,symbol FROM test WHERE study IN ('$myArray[$i]'); $result = mysql_query($sql); if(mysql_num_rows($result) 0) { while ($myrow = mysql_fetch_array($result)) {

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread ceo
I actually would do more like: $myArray[$study][$symbol] = true; No need to call in_array. Probably won't matter, really, but it's a good practice for when you end up doing the same kind of code for an array with thousands of elements. -- PHP General Mailing List

Re: [PHP] SELECT into array of arrays

2008-12-03 Thread Yeti
And yet another thing i have overseen in my statement .. If you remove the first for loop, also change the sql query. But I'm sure you saw that already NEW QUERY: $sql = SELECT study,symbol FROM test WHERE study IN ('.implode(', ', $myArray).'); -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Select Box CSS

2007-12-18 Thread Stut
VamVan wrote: Please apologize for sending this question to PHP forums. If you know this already why ask the question here? Also, this is not a forum. But I would appreciate it very much if some could please help me styling select mutiple in HTMl with CSS? I have .selectmulti { border:

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Børge Holen
On Tuesday 18 December 2007 20:03:53 Stut wrote: VamVan wrote: Please apologize for sending this question to PHP forums. If you know this already why ask the question here? Also, this is not a forum. But I would appreciate it very much if some could please help me styling select mutiple

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Dave Goodchild
Why not try a css list? css-discuss for example? On Dec 18, 2007 8:06 PM, Børge Holen [EMAIL PROTECTED] wrote: On Tuesday 18 December 2007 20:03:53 Stut wrote: VamVan wrote: Please apologize for sending this question to PHP forums. If you know this already why ask the question here?

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Børge Holen
On Tuesday 18 December 2007 21:16:46 you wrote: Why not try a css list? css-discuss for example? Yes why not? On Dec 18, 2007 8:06 PM, Børge Holen [EMAIL PROTECTED] wrote: On Tuesday 18 December 2007 20:03:53 Stut wrote: VamVan wrote: Please apologize for sending this question to PHP

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Richard Lynch
On Tue, December 18, 2007 2:06 pm, Børge Holen wrote: On Tuesday 18 December 2007 20:03:53 Stut wrote: VamVan wrote: Please apologize for sending this question to PHP forums. If you know this already why ask the question here? Also, this is not a forum. But I would appreciate it very

Re: [PHP] Select Box CSS OT

2007-12-18 Thread Børge Holen
On Wednesday 19 December 2007 03:59:11 Richard Lynch wrote: On Tue, December 18, 2007 2:06 pm, Børge Holen wrote: On Tuesday 18 December 2007 20:03:53 Stut wrote: VamVan wrote: Please apologize for sending this question to PHP forums. If you know this already why ask the question here?

Re: [PHP] Select record by ID

2007-01-31 Thread Richard Lynch
On Tue, January 30, 2007 4:14 pm, nitrox . wrote: Richard, ive included your suggested code and now my php script is working properly. But I dont want to be a php copy/paste newb who has no clue of how things are working. If its not too much would you (or anybody) give a brief explanation

Re: [PHP] Select record by ID

2007-01-31 Thread Richard Lynch
On Tue, January 30, 2007 7:23 pm, Craige Leeder wrote: atleast this part: $user_id = mysql_real_escape_string((int) $_GET['user_id']); I'm not sure who put this in there, but you don't need to use mysql_real_escape_string() on that value if you're type casting it. If you are forcing it to be

Re: [PHP] Select record by ID

2007-01-30 Thread nitrox .
Thanks to all who have replied. As you probably have noticed im a total novice to php who is trying to achieve big things. Richard, ive included your suggested code and now my php script is working properly. But I dont want to be a php copy/paste newb who has no clue of how things are

Re: [PHP] Select record by ID

2007-01-30 Thread Paul Novitski
At 1/30/2007 02:14 PM, nitrox . wrote: If its not too much would you (or anybody) give a brief explanation of what this code is doing? Or are there any tutorials online that I can read that will educate me on this? Thanks again to all for your replies. Ive saved them all for future reference.

Re: [PHP] Select record by ID

2007-01-30 Thread Craige Leeder
atleast this part: $user_id = mysql_real_escape_string((int) $_GET['user_id']); I'm not sure who put this in there, but you don't need to use mysql_real_escape_string() on that value if you're type casting it. If you are forcing it to be an integer, there is nothing to escape. Integers are

Re: [PHP] Select record by ID

2007-01-29 Thread Robert Cummings
On Sun, 2007-01-28 at 21:12 -0500, Craige Leeder wrote: As someone else already stated, my best guess according to that error is that $user_id has a null, or inappropriate value. The error occurs at the last character of the query, so it has to be something like hat. Echo the query and let us

Re: [PHP] Select record by ID

2007-01-29 Thread Richard Lynch
On Sun, January 28, 2007 5:21 pm, nitrox . wrote: Im trying to display one record at a time by ID. Well im getting a blank page. Ive looked over my code and tried 20 different ways to get it to work to no avail. So any pointers on what Im doing wrong would be great. here is the code im

Re: [PHP] Select record by ID

2007-01-29 Thread Richard Lynch
January 28, 2007 6:20 pm, Larry Garfield wrote: On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote: On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote: I took the quotes off. I thought that quotes around numbers was wrong also. Quotes are no necessary around numeric

Re: [PHP] Select record by ID

2007-01-29 Thread Richard Lynch
On Sun, January 28, 2007 6:20 pm, Larry Garfield wrote: On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote: On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote: I took the quotes off. I thought that quotes around numbers was wrong also. Quotes are no necessary around

Re: [PHP] Select record by ID

2007-01-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-29 17:54:03 -0600: MySQL is the *only* db engine that lets you get away with [bleep] like apostrophes around numbers. Actually, these are examples of valid SQL: INTEGER '1', FLOAT '13.5'. test=# select version();

Re: [PHP] Select record by ID

2007-01-29 Thread Richard Lynch
On Mon, January 29, 2007 6:55 pm, Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-29 17:54:03 -0600: MySQL is the *only* db engine that lets you get away with [bleep] like apostrophes around numbers. Actually, these are examples of valid SQL: INTEGER '1', FLOAT '13.5'. test=# select

Re: [PHP] Select record by ID

2007-01-29 Thread Larry Garfield
On Monday 29 January 2007 7:19 pm, Richard Lynch wrote: Looks like PostgreSQL caved in to the unwashed masses of MySQL users who couldn't handle not putting apostrophes around everything to me... [sigh] :-) :-) :-) Oh well. I personally would prefer that the DB not accept bogus input

Re: [PHP] Select record by ID

2007-01-29 Thread Richard Lynch
On Mon, January 29, 2007 7:43 pm, Larry Garfield wrote: On Monday 29 January 2007 7:19 pm, Richard Lynch wrote: Looks like PostgreSQL caved in to the unwashed masses of MySQL users who couldn't handle not putting apostrophes around everything to me... [sigh] :-) :-) :-) Oh well. I

Re: [PHP] Select record by ID

2007-01-28 Thread Francisco M. Marzoa Alonso
The first thing that I probably do is to check for possible errors from DB: $result = mysql_query(SELECT * FROM inf_member WHERE user_id='$user_id' ); if ( ! $result ) { die (Could not perform query $query: .mysql_error().\n); } Regards, On dom,

Re: [PHP] Select record by ID

2007-01-28 Thread nitrox .
I took the quotes off. I thought that quotes around numbers was wrong also. I added the error checking and this is the error: Could not perform query : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at

Re: [PHP] Select record by ID

2007-01-28 Thread Francisco M. Marzoa Alonso
Ops!, Better this one: $query = SELECT inf_member WHERE user_id='$user_id' ; $result = mysql_query($query); if ( ! $result ) { die (Could not perform query $query: .mysql_error().\n); } I did copy and paste from my own code and you've not $query

Re: [PHP] Select record by ID

2007-01-28 Thread Paul Novitski
At 1/28/2007 03:21 PM, nitrox . wrote: Im trying to display one record at a time by ID. Well im getting a blank page. Ive looked over my code and tried 20 different ways to get it to work to no avail. So any pointers on what Im doing wrong would be great. here is the code im working with so

Re: [PHP] Select record by ID

2007-01-28 Thread Francisco M. Marzoa Alonso
On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote: I took the quotes off. I thought that quotes around numbers was wrong also. Quotes are no necessary around numeric values, but they aren't wrong neither, simply optional. I added the error checking and this is the error: Could not perform

Re: [PHP] Select record by ID

2007-01-28 Thread Larry Garfield
On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote: On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote: I took the quotes off. I thought that quotes around numbers was wrong also. Quotes are no necessary around numeric values, but they aren't wrong neither, simply optional.

Re: [PHP] Select record by ID

2007-01-28 Thread Francisco M. Marzoa Alonso
On dom, 2007-01-28 at 18:20 -0600, Larry Garfield wrote: On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote: On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote: I took the quotes off. I thought that quotes around numbers was wrong also. Quotes are no necessary around

Re: [PHP] Select record by ID

2007-01-28 Thread Craige Leeder
As someone else already stated, my best guess according to that error is that $user_id has a null, or inappropriate value. The error occurs at the last character of the query, so it has to be something like hat. Echo the query and let us know what it outputs. - Craige On 1/28/07, Francisco M.

Re: [PHP] Select two table with DB_DataObject

2006-11-24 Thread Richard Lynch
On Fri, November 24, 2006 10:27 am, Yves Tannier wrote: First, sorry for my bad english ;) I'm looking for a simple way to provide query with two table like this : SELECT t1.idperson, t1.lastname FROM table1 t1, table2 t2 WHERE t1.idperson=t2.idperson AND t1.idperson=2 I try with joinAdd

Re: [PHP] Select two table with DB_DataObject

2006-11-24 Thread Yves Tannier
2006/11/24, Richard Lynch [EMAIL PROTECTED]: On Fri, November 24, 2006 10:27 am, Yves Tannier wrote: First, sorry for my bad english ;) I'm looking for a simple way to provide query with two table like this : SELECT t1.idperson, t1.lastname FROM table1 t1, table2 t2 WHERE

Re: [PHP] select colum in array.

2006-08-18 Thread John Nichel
Adam Zey wrote: I must say So you've said. Three times now. ;) -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] select colum in array.

2006-08-18 Thread Richard Lynch
On Thu, August 17, 2006 9:02 am, João Cândido de Souza Neto wrote: I´m not sure if it´s the right place to get such answer, but if someone know, please, help me. In a select id,name,picture1,picture2,picture3 from product where id=10 i get an array with each colum in each element like this

Re: [PHP] select colum in array.

2006-08-18 Thread Richard Lynch
On Fri, August 18, 2006 1:32 pm, Adam Zey wrote: I must say, I'm of the opinion that as much data processing should be done in the database server possible. I agree with you 100% in principle... But in this case, we're talking about structuring the data in a PHP-specific data structure for

Re: [PHP] select colum in array.

2006-08-18 Thread Adam Zey
Richard Lynch wrote: On Thu, August 17, 2006 9:02 am, João Cândido de Souza Neto wrote: I´m not sure if it´s the right place to get such answer, but if someone know, please, help me. In a select id,name,picture1,picture2,picture3 from product where id=10 i get an array with each colum in each

Re: [PHP] select colum in array.

2006-08-17 Thread Robert Cummings
On Thu, 2006-08-17 at 11:02 -0300, João Cândido de Souza Neto wrote: Hi everyone, Im not sure if its the right place to get such answer, but if someone know, please, help me. In a select id,name,picture1,picture2,picture3 from product where id=10 i get an array with each colum in each

Re: [PHP] select tag doesn't update post or get

2006-08-08 Thread Jochem Maas
Roel Dillen wrote: I have a xhtml form with a select with options if I click submit the processing page is loaded and the result of the form is shown. The option given to the processing page however is always the same: the first in the list. It doesn't matter what I select in the drop down

Re: [PHP] select option and php

2006-07-25 Thread Jochem Maas
weetat wrote: Hi Jay , I am not in the javascript group. 'the javascript group' ?? document.forms['listfrm'].submit; document.forms['listfrm'].submit(); ^^--- i.e. actually call the method -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] select option and php

2006-07-24 Thread Jay Blanchard
[snip] It will produce the html tag as shown below: script language=JavaScript function gotoPage(){ var urlpath = ../listflag.php?start=pageID=+3; document.forms['listfrm'].method = 'post'; document.forms['listfrm'].action = urlpath; document.forms['listfrm'].submit; } /script form

Re: [PHP] select option and php

2006-07-24 Thread weetat
Hi Jay , I am not in the javascript group. Btw , i have added document.forms['listfrm'].pageid.value in the page , but the form is not submitted ? var pageid = document.forms['listfrm'].pageid.value; var urlpath = ../listflag.php?start=pageID=+pageid;

Re: [PHP] SELECT tag and PHP

2006-06-16 Thread Jochem Maas
weetat wrote: Hi all , I have a SELECT for country in the php file . I would like to load the country and city belong to the country dynamically from the database. Anyone have ideas how to do it ? below is a function that generates a select tag based on the criteria you give it, the

Re: [PHP] SELECT?

2005-12-30 Thread Richard Lynch
On Wed, December 28, 2005 2:50 am, William Stokes wrote: I have one MySQL table with about 500 rows. I need to read the table one row at a time, make some changes to data in one field and then store the changed data to another table. I'm using PHP to change the data but I have no idea how

Re: [PHP] SELECT?

2005-12-30 Thread Paul Waring
On 12/30/05, Richard Lynch [EMAIL PROTECTED] wrote: The suggestions so far are good, but watch out for this: If you do one record at a time, and are using LIMIT, and then something gets inserted into the original table... Boom! You could always lock the tables whilst performing the update -

RE: [PHP] SELECT?

2005-12-28 Thread Christian Ista
From: William Stokes [mailto:[EMAIL PROTECTED] I have one MySQL table with about 500 rows. I need to read the table one row at a time, make some changes to data in one field and then store the changed data to another table. 1. May be add a column, CHANGED_FL with default value N. 2. Select

Re: [PHP] SELECT?

2005-12-28 Thread Max Schwanekamp
William Stokes wrote: I have one MySQL table with about 500 rows. I need to read the table one row at a time, make some changes to data in one field and then store the changed data to another table. I'm using PHP to change the data but I have no idea how to select one row at a time from the DB

Re: [PHP] SELECT?

2005-12-28 Thread Paul Waring
On 12/28/05, William Stokes [EMAIL PROTECTED] wrote: I have one MySQL table with about 500 rows. I need to read the table one row at a time, make some changes to data in one field and then store the changed data to another table. I'm using PHP to change the data but I have no idea how to

Re: [PHP] SELECT?

2005-12-28 Thread Zareef Ahmed
Stokes' [EMAIL PROTECTED]; php-general@lists.php.net Sent: Wednesday, December 28, 2005 3:57 AM Subject: RE: [PHP] SELECT? From: William Stokes [mailto:[EMAIL PROTECTED] I have one MySQL table with about 500 rows. I need to read the table one row at a time, make some changes to data in one

Re: [PHP] select statement with variables ???

2005-12-21 Thread Robin Vickery
On 12/21/05, Anasta [EMAIL PROTECTED] wrote: Can someone tell me why this select is wrong please---ive tried everything. the $cat is the tablename . You've tried *everything* ? Why do you think it's wrong? Did you get an error message of some kind? What do you see if you echo $query? Are the

RE: [PHP] select statement with variables ???

2005-12-21 Thread Jim Moseby
Can someone tell me why this select is wrong please---ive tried everything. the $cat is the tablename . $query= SELECT title FROM $cat WHERE id='$id'; Apparently, either $cat or $id is not the value you think it is. First, I would try changing $result=mysql_query($query); to

RE: [PHP] select statement with variables ???

2005-12-21 Thread Jay Blanchard
[snip] $query= SELECT title FROM $cat WHERE id='$id'; [/snip] echo $query; // does it look right to you? Alway throw an error when in question if(!($result = mysql_query($query, $connection))){ echo mysql_error() . br\n; exit(); } My bet is that you need to concatenate $query = SELECT

Re: [PHP] select statement with variables ???

2005-12-21 Thread Jochem Maas
side-question Jay how come you though concating would give a different result to interpolation? /side-question Jay Blanchard wrote: [snip] $query= SELECT title FROM $cat WHERE id='$id'; [/snip] echo $query; // does it look right to you? Alway throw an error when in question if(!($result =

RE: [PHP] select statement with variables ???

2005-12-21 Thread Jay Blanchard
[snip] side-question Jay how come you though concating would give a different result to interpolation? /side-question [/snip] It is not really a different result, it is just something that I am in the habit of doing. The concat or not to concat question has fueled many a holy war. I concat,

Re: [PHP] select statement with variables ???

2005-12-21 Thread Jochem Maas
Jay Blanchard wrote: [snip] side-question Jay how come you though concating would give a different result to interpolation? /side-question [/snip] It is not really a different result, it is just something that I am in the habit of doing. The concat or not to concat question has fueled many a

Re: [PHP] Select and $_POST

2005-11-10 Thread Richard Lynch
On Wed, November 9, 2005 5:21 pm, Ross wrote: $query = SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'; In addition to the fine posts regarding SQL Injection and curly braces, I'd like to provide one other alternative heretofore unmentioned: $query = SELECT

RE: [PHP] Select and $_POST

2005-11-09 Thread Matt Babineau
$query = SELECT * FROM login WHERE username = '.$_POST['username'].' AND pass = '. $_POST['pass'].'; What is the correct syntax for $query = SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'; Thought this would work. R. -- PHP General Mailing

  1   2   3   >