Re: [PHP] SELECT + PARSE ERROR

2002-04-08 Thread Chris Kwasneski
At 02:23 PM 4/8/2002 +0200, you wrote: >Hy, > >I try to do a SELECT but when I test my code I Have a parse error. >If someone can explain to me why. > >Code: > >$db = mysql_connect(newsmanga_db); >$req = "SELECT * FROM dvds WHERE nomdvd='".$nom."".$i"' "; /// PARSE >ERROR IN THIS LINE Your miss

Re: [PHP] Select then update

2002-03-23 Thread Alberto Wagner
You need to put {} in the while function like this while { do this } $query = "SELECT name FROM users"; $ret = mysql_query($query); while(list($name) = mysql_fetch_row($ret)) or die("Error: ".mysql_error()) { print ("your name is $name); $query_update["name"] = ("UPDATE my_other_table set

Re: [PHP] SELECT DAYOFYEAR(NOW())

2002-01-13 Thread sundogcurt
I am a dork! And you answered that almost before I sent it, you're like Mighty Mouse on Ginseng! [EMAIL PROTECTED] wrote: >This doesn't appear to be a PHP question. Are you sure you are on the >right list? > >On Sun, 13 Jan 2002, sundogcurt wrote: > >>Hi! I'm storing a date in this format : >>

Re: [PHP] SELECT DAYOFYEAR(NOW())

2002-01-13 Thread Rasmus Lerdorf
This doesn't appear to be a PHP question. Are you sure you are on the right list? On Sun, 13 Jan 2002, sundogcurt wrote: > Hi! I'm storing a date in this format : > > 2002-01-13 11:08:40 > -mm-dd hh:mm:ss > > This is great because it gives me the date and the time, which I need. > I want to

RE: [PHP] Select box won't display in Netscape 4.xx

2002-01-02 Thread Jerry Verhoef (UGBI)
Did you forget the tags? Jerry -Original Message- From: Martin Schichl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 02, 2002 9:57 AM To: Edwin Boersma; [EMAIL PROTECTED] Subject: Re: [PHP] Select box won't display in Netscape 4.xx Dear Edwin! Yes, I have had this pr

Re: [PHP] Select box won't display in Netscape 4.xx

2002-01-02 Thread Martin Schichl
Dear Edwin! Yes, I have had this problem before ... My problem was, that I a line in my style sheets, which could not be solved by NS. (I think it was "border?) Yours, Martin >I'm developing a website for multiple browsers. In Netscape 4.xx (both >Win98 and Linux versions), the php-scripts

Re: [PHP] Select box won't display in Netscape 4.xx

2001-12-31 Thread sundogcurt
Have you double and triple checked to be sure your form elements are nested properly? [EMAIL PROTECTED] wrote: >Hi, > >I'm developing a website for multiple browsers. In Netscape 4.xx (both >Win98 and Linux versions), the php-scripts display the select boxes in >my forms only as plain text. I c

Re: [PHP] Select box won't display in Netscape 4.xx

2001-12-31 Thread Jim Lucas [php]
check and make sure the you have the correct opening and closing form tags. NS 4.x will "choke" if you don't have an opening and closing tag. While IE 5, 5.5 and 6 will work fine. Jim - Original Message - From: "Edwin Boersma" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, Dec

Re: [PHP] Select box won't display in Netscape 4.xx

2001-12-31 Thread David Jackson
Miles --- Here's the link to W3C: HTML/XHTML and CSS validation page. It's a excellent tool for debuging pages. http://validator.w3.org/ David > > Sounds like a problem with HTML syntax. NS is notoriously fussy and IE > remarkably lax. Capture your source and compare against the HTML > standar

Re: [PHP] Select box won't display in Netscape 4.xx

2001-12-31 Thread Miles Thompson
Sounds like a problem with HTML syntax. NS is notoriously fussy and IE remarkably lax. Capture your source and compare against the HTML standard. I'm surprised NS6 is accepting what NS4 is choking on. Happy New Year - Miles PS I'd bet a cup of coffee that a closing tag is missing. At 12:06 P

Re: [PHP] 'Select All'

2001-12-18 Thread Shane Wright
Hi Martin, Excellent, thanks for your help :) Regards -- Shane On Monday 17 Dec 2001 10:15 pm, Martin Towell wrote: > you _can_ reference it by name - try this: > > > function my_select(type) > { > frm = document.forms.test; > ele = frm["mycheckbox[]"]; > len = ele.length; >

RE: [PHP] 'Select All'

2001-12-17 Thread Martin Towell
you _can_ reference it by name - try this: function my_select(type) { frm = document.forms.test; ele = frm["mycheckbox[]"]; len = ele.length; for (i = 0; i < len; i++) ele[i].checked = type; } Martin -Original Message- From: Shane Wright [mailto:[E

Re: [PHP] 'Select All'

2001-12-17 Thread Bas van Rooijen
Oh, one more thing.. The latest MSIE suddenly doesn't seem to support the function to be named 'selection' . change that and it'll work ;) bvr. > > >I know *exactly* what you mean, the solution (took me at least an hour) is attached. > >have fun, >bvr. > -- PHP General Mailing List (http:

Re: [PHP] 'Select All'

2001-12-17 Thread Shane Wright
Hi Charles, As a button, ideally two in fact - 'select all' and 'unselect all'. I've done it easily with ASP sites - where the '[]' is not required to have the values passed back as an array. (I know I could find a non-array way of doing it but its a pain) -- Shane On Monday 17 Dec 2001

Re: [PHP] 'Select All'

2001-12-17 Thread Bas van Rooijen
I know *exactly* what you mean, the solution (took me at least an hour) is attached. have fun, bvr. On Mon, 17 Dec 2001 17:54:42 +, Shane Wright wrote: >Hi > >I'm having somewhat of a problem :( > >I have my banks of checkboxes, all named 'mycheckbox[]' with the values as >different IDs.

Re: [PHP] 'Select All'

2001-12-17 Thread Charles Williams
Shane, is this meant for initial settings of the form only or as a button, or some such, to allow someone to select all the boxs? chuck - Original Message - From: "Shane Wright" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 17, 2001 6:54 PM Subject: [PHP] 'Select Al

Re: [PHP] select+uploading multiple files

2001-11-02 Thread fitiux
Hi Shane.. :-) thankyou for your help.. I was wondering myself about that.. and I surfed the net for many days just searching for a solution... but now I know what it is the limitation.. thanks again. =) I think as you say.. consider a client-side applet. best regards from Chile --Patricio

Re: [PHP] select+uploading multiple files

2001-11-02 Thread Shane Wright
Hi fitiux I'm sure the list will correct me if I'm wrong, but what you're talking about isnt possible, at least not in this way. This isn't a limitation of PHP - its a limitation of the HTML form element that handles the uploads. You could consider a client-side applet to achieve the result a

RE: [PHP] select based on time/date

2001-09-26 Thread Jason Dulberg
2001 1:59 PM > To: Jason Dulberg; [EMAIL PROTECTED] > Subject: Re: [PHP] select based on time/date > > > Timestamp only sets itself to Now() if it isn't explicitly set (or set to > NULL). So try this: > > $out = "UPDATE logged_in SET session='',

Re: [PHP] select based on time/date

2001-09-26 Thread Sheridan Saint-Michel
Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: "Sheridan Saint-Michel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 12:44 PM Subject: RE: [PHP] sel

RE: [PHP] select based on time/date

2001-09-26 Thread Jason Dulberg
u again for your time. I've learned alot from this. __ Jason Dulberg Extreme MTB http://extreme.nas.net > -Original Message- > From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] > Sent: September 26, 2001 9:38 AM > To: Jason Dulberg; [EMAIL PROTECTED] &

Re: [PHP] select based on time/date

2001-09-26 Thread Sheridan Saint-Michel
f the date types. Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 6:24 PM Subject: RE

Re: [PHP] select based on time/date

2001-09-26 Thread Sheridan Saint-Michel
TECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 5:08 PM Subject: RE: [PHP] select based on time/date > I tried basically what you have but I got an error: > > $sql="select * from logged_in where time_in + interval 1 hour <= now()"; > $result

RE: [PHP] select based on time/date

2001-09-25 Thread Jason Dulberg
To: 'Jason Dulberg'; 'Sheridan Saint-Michel'; [EMAIL PROTECTED] > Subject: RE: [PHP] select based on time/date > > > select * from logged_in where date_add(time_in,interval 1 hour) <= now() > > -jack > > -Original Message- > From: Jason Du

RE: [PHP] select based on time/date

2001-09-25 Thread Jack Dempsey
select * from logged_in where date_add(time_in,interval 1 hour) <= now() -jack -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 6:08 PM To: Sheridan Saint-Michel; [EMAIL PROTECTED] Subject: RE: [PHP] select based on time/date I tr

RE: [PHP] select based on time/date

2001-09-25 Thread Jason Dulberg
> > select * from sessions where $timein + interval 1 hour <= now(); - Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 2:35 PM Subject: RE: [PHP] select based on time/date

Re: [PHP] select based on time/date

2001-09-25 Thread Sheridan Saint-Michel
- Original Message - From: "Jason Dulberg" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, September 25, 2001 2:35 PM Subject: RE: [PHP] select based on time/date > I had a look at the DATE_FORMAT info on the mysql doc

RE: [PHP] select based on time/date

2001-09-25 Thread Jason Dulberg
I had a look at the DATE_FORMAT info on the mysql doc page and its a bit easier to understand than the CONCATS. Would I want to use the CURTIME() function since I would want to select sessions based on the hour? How would I go about combining CURTIME with the rest of my query? Theoretically, her

Re: [PHP] select based on time/date

2001-09-24 Thread David Robley
On Tue, 25 Sep 2001 13:38, Maxim Maletsky \(PHPBeginner.com\) wrote: > Don't do it with PHP. Instead use the native functions of mySQL itself. > > Use the combination of CONCAT(), some string and date functions of > mySQL. > Something like CONCAT(SUBSTRING(), SUBSTRING(), ...) so you end up in > t

RE: [PHP] select based on time/date

2001-09-24 Thread Maxim Maletsky \(PHPBeginner.com\)
Don't do it with PHP. Instead use the native functions of mySQL itself. Use the combination of CONCAT(), some string and date functions of mySQL. Something like CONCAT(SUBSTRING(), SUBSTRING(), ...) so you end up in the right time format i.e.: -00-00. With that string you should be able to do

Re: [PHP] select in PHP + Sql Server

2001-09-13 Thread Ben . Edwards
You're doing something wrong! Indexes are only for performance and possibly they may be used for helping in ensuring uniquenes. sorry cant be any more help without code. "Marcos Mathias" <[EMAIL PROTECTED]> on 13/09/2001 20:40:40 Please respond to <[EMAIL PROTECTED]> To: <[EMAIL PROTE

RE: [PHP] SELECT * FROM

2001-08-29 Thread Jon Haworth
Couple of other tips for you. 1. SELECT * is bad unless you really need every field. If you don't, specify which ones you want - the query will perform better. $s = "SELECT * FROM News"; // bad $s = "SELECT NewsHeadline, NewsTeaser FROM News"; // better 2. You appear to be connecting to your

Re: [PHP] SELECT * FROM

2001-08-29 Thread Jeff Lewis
In your query add ORDER BY "field name like date or ID" DESC. That way it will put them in descending order and I do believe that is what you're looking for :) Jeff - Original Message - From: "Tarrant Costelloe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 29, 2001

Re: [PHP] select problem

2001-08-15 Thread Gyozo Papp
Hi, if your script makes errors on mysql_query() try to printthe errormessages sent back by MySql: mysql_query(...) or die(mysql_error()); see: http://www.php.net/manual/en/function.mysql-error.php - Original Message - From: "Roman" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTE

RE: [PHP] Select

2001-08-14 Thread Alfredeen, Johan
Jeremy, The reason you are only getting the first value is because you are only retrieving the first value and assigning it to $data. You need to step through the result and do something with it. For example, if ($row = mysql_fetch_array($result)) { do {

RE: [PHP] Select

2001-08-14 Thread Jon Farmer
oops slight mistake i noticed there.. should be thats because mysql_fetch_row only returns one row. to get all the rows do while ($row = mysql_fetch_array($result)) { $firstcloumn = $row[0]; } This will run through all the rows putting the colunms into the array $row[] Regards Jo

Re: [PHP] Select

2001-08-14 Thread Pavel Jartsev
Jeremy Morano wrote: > > ... > > $data=mysql_fetch_row($result); > $count=$data[0]; > > echo $count; > > Yet the only result I get is the first value of the first > column. > Of course, and $data[1] is the first value of second column, etc. If you want to get all result, use w

RE: [PHP] Select

2001-08-14 Thread Jon Farmer
thats because mysql_fetch_row only returns one row. to get all the rows do while ($row = mysql_fetch_array($result) { //processing code here } This will run through all the rows putting the colums into the array $row[] Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta

RE: [PHP] Select IN array?

2001-07-14 Thread Chris Lott
> I have an array of id numbers ($catids). > This syntax fails: > select * from categories > where cid in $catids Never mind. I was being stupid. For the record, one needs to implode(",", $catids) and then use that in the WHERE statement, i.e. "where cid in ($catids)" c -- PHP General Mailin

Re: [PHP] select the most repeated value in a field

2001-05-24 Thread [EMAIL PROTECTED]
rewarding than reaching the goal you've set for yourself" - Original Message - From: George E. Papadakis <[EMAIL PROTECTED]> To: Jacky <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 2:56 AM Subject: Re: [PHP] select the most repeated value in a f

Re: [PHP] select the most repeated value in a field

2001-05-24 Thread George E. Papadakis
select result,count(*) as cnt from table group by result order by cnt desc ; - Original Message - From: "Jacky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 24, 2001 10:02 PM Subject: [PHP] select the most repeated value in a field Hi people How do i query to select

RE: [PHP] select the most repeated value in a field

2001-05-24 Thread Maxim Maletsky
use GROUP BY SELECT result, COUNT(result) AS res_count FROM result GROUP BY result ORDER BY res_count DESC ; Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com ---

Re: [PHP] select specified elements from an array

2001-05-22 Thread Markus Fischer
On Wed, May 23, 2001 at 12:27:04AM +0200, Gyozo Papp wrote : > Thanks for your fast reply. > One more question related to this topic. > Would it be valueable to extend the existing array_values() > function to support this feature? just to balance with > array_keys() and its optional value argum

Re: [PHP] select specified elements from an array

2001-05-22 Thread Gyozo Papp
t; <[EMAIL PROTECTED]> To: "Gyozo Papp" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: 2001. május 23. 00:14 Subject: Re: [PHP] select specified elements from an array > On Wed, May 23, 2001 at 12:06:42AM +0200, Gyozo Papp wrote : > > function array_part($fromar

Re: [PHP] select specified elements from an array

2001-05-22 Thread Markus Fischer
On Wed, May 23, 2001 at 12:06:42AM +0200, Gyozo Papp wrote : > function array_part($fromarray, $keys) > { > foreach($fromarray as $key => $val) > { > if (in_array($key, $keys) >$anotherarray[$key] = $val; > } > return $anotherarray; > } foreach( $keys as $key)

Re: [PHP] select the max value

2001-05-21 Thread Gyozo Papp
select max(scorevalue) from score; - Original Message - From: "Jacky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 2001. május 21. 22:38 Subject: [PHP] select the max value Hi all Is this the corerct way of selecting the max value in a table? "select * from score where MAX(scoreva

Re: [PHP] select the max value

2001-05-21 Thread Tom Rogers
Hi try: select * from score order by scorevalue DESC LIMIT 1 or if your db supports sub selects: select * from score where scorevalue=(select MAX(scorevalue) from score) Tom At 03:38 PM 21/05/01 -0500, Jacky wrote: >Hi all >Is this the corerct way of selecting the max value in a table? >"selec

RE: [PHP] select the max value

2001-05-21 Thread Craig Vincent
SELECT MAX(scorevalue) FROM score Will display the maximum value of your scorevalue column. Sincerely, Craig Vincent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrator

Re: [PHP] select question

2001-04-17 Thread Joe Stump
In MySQL you can do this: $sql = "SHOW TABLES LIKE 'box%'"; $r = mysql_query($sql); // then loop through the tables and populate --Joe On Tue, Apr 17, 2001 at 07:49:11PM -0400, Matt TrollBoy Wiseman wrote: > How would I word a query to see what tables exist in a db that begin with > box > >

RE: [PHP] select question

2001-04-17 Thread Don Read
On 17-Apr-01 Matt \"TrollBoy\" Wiseman wrote: > How would I word a query to see what tables exist in a db that begin with > box > > for example include > boxTABLE1 > boxTABLE2 > boxTABLE3 > but exclude > sphereTABLE1 > > I'm basically trying lo populate a list box with the tables beginning with

Re: [PHP] select question

2001-04-17 Thread Steve Werby
"Matt "TrollBoy" Wiseman" <[EMAIL PROTECTED]> wrote: > How would I word a query to see what tables exist in a db that begin with > box > > for example include > boxTABLE1 > boxTABLE2 > boxTABLE3 > but exclude > sphereTABLE1 > > I'm basically trying lo populate a list box with the tables beginning

Re: [PHP] Select case equivelent

2001-04-05 Thread Geir Eivind Mork
On 05 Apr 2001 11:53:21 +0200, Christian Reiniger wrote: switch ($foo) { case "bar1": $foobar="fooey"; break; default: $foobar = "NoBar"; } > > I have a list of conditions I want to test against. > > In ASP, I would do: > > How do I do the equivelent in PHP? > Try reading the m

Re: [PHP] Select case equivelent

2001-04-05 Thread Christian Reiniger
On Wednesday 04 April 2001 20:07, you wrote: > I have a list of conditions I want to test against. > In ASP, I would do: > > Select Case foo > case "bar1" > foobar = "fooey" > case "bar2" > foobar = "fooey2" > case "bar3" > foobar = "fooey3" > case else >

RE: [PHP] Select case equivelent

2001-04-04 Thread Johnson, Kirk
See the "switch" statement. http://www.php.net/manual/en/control-structures.switch.php Kirk > -Original Message- > From: Allen May [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 04, 2001 12:07 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Select case equivelent > > > I have a list

Re: [PHP] Select case equivelent

2001-04-04 Thread Jon Rosenberg
switch ($i) { case 0: print "i equals 0"; break; case 1: print "i equals 1"; break; case 2: print "i equals 2"; break; } - Original Message - From: "Allen May" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April

Re: [PHP] select * from nmensagem m, nusuario...

2001-03-15 Thread Richard Lynch
> select * from nmensagem m, nusuario u, nprefuser p where > m.cdpreferencia=p.cdpreferencia and p.flag=1; > > With "m.cdpreferencia=p.cdpreferencia" I should get just the values there > exists on m.preferencia and p.cdpreferencia? No, because you have a record for every single nusario, since you

Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working

2001-02-14 Thread Ben Peter
hanks ben it works :) > > Just one thing if i say enter just one letter .. how could i make it show > more than just the one result? > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Peter > Sent: Thursday, February 15, 2

RE: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working

2001-02-14 Thread Peter Houchin
: PHP MAIL GROUP Subject: Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working Peter, after querying the database, you need to fetch the returned values from the result before you can use them: > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$

Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working

2001-02-14 Thread Ben Peter
Peter, after querying the database, you need to fetch the returned values from the result before you can use them: > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$query%'"); $row = mysql_fetch_row($result); $company = $row[0]; OR (shorter): list($company)=mysql_

Re: [PHP] SELECT BLAH WHERE BLAH LIKE BLAH not working

2001-02-14 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Peter Houchin") wrote: > > > > > echo " BGCOLOR=\"#CC\" ALIGN=\"CENTER\">\n\n bgcolor=\"#006699\"> sans-serif\" size=\"3\" color=\"#FF\">Company "; > $result = mysql_query("SELECT company FROM resellers WHERE Company LIKE > '%$quer

Re: [PHP] SELECT statement

2001-02-13 Thread Michael McGlothlin
L PROTECTED]\">webmaster > > "); > // if successful then do this > if ($num == 1) { > > > > include "quote2.php"; //has a hidden field referencing the user & the email > address .. user shows up but again email does not > } > &g

RE: [PHP] SELECT statement

2001-02-13 Thread Peter Houchin
ebmaster "); // if successful then do this if ($num == 1) { include "quote2.php"; //has a hidden field referencing the user & the email address .. user shows up but again email does not } ?> -Original Message- From: Philip Olson [mailto:[EMAIL PROTEC

RE: [PHP] SELECT statement

2001-02-13 Thread PHPBeginner.com
-Original Message- From: Peter Houchin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 2:51 PM To: PHP MAIL GROUP Subject: RE: [PHP] SELECT statement ok I've changed my code to $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass&#x

RE: [PHP] SELECT statement

2001-02-13 Thread PHPBeginner.com
Yeah, sure you can: $sql="SELECT id, email FROM table WHERE user='$user' and pass='$pass'"; Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Peter Houchin [mailto:[EMAIL PROTEC

Re: [PHP] SELECT statement

2001-02-12 Thread David Robley
On Tue, 13 Feb 2001 16:20, Peter Houchin wrote: > ok I've changed my code to > > $sql = "SELECT id, email FROM users WHERE user='$user' and > pass='$pass'"; but still no joy can any one suggest why? > > (& Yes email is a field in the table) > > Peter > > > Hi, > > > > Can you have a SELECT stateme

RE: [PHP] SELECT statement

2001-02-12 Thread Philip Olson
A possible way to find out : $result = mysql_query($sql) or die(mysql_error()); Does it say anything? mysql_error() is your friend, it can be printed anywhere within the script and will print the last mysql error. So perhaps : print mysql_error(); Right before the query or ... Regar

RE: [PHP] SELECT statement

2001-02-12 Thread Peter Houchin
ok I've changed my code to $sql = "SELECT id, email FROM users WHERE user='$user' and pass='$pass'"; but still no joy can any one suggest why? (& Yes email is a field in the table) Peter > Hi, > > Can you have a SELECT statement (using mysql) that goes something like > > $sql="SELECT

Re: [PHP] SELECT statement

2001-02-12 Thread David Robley
On Tue, 13 Feb 2001 16:00, Peter Houchin wrote: > > Hi, > > Can you have a SELECT statement (using mysql) that goes something like > > $sql="SELECT id && email FROM table WHERE user='$user' and > pass='$pass'"; > > and if you can't is there a away around this? > > Thanks > > Peter In SQL queries

Re: [PHP] SELECT statement

2001-02-12 Thread Philip Olson
Assuming you want to select both id and email from table, use commas : SELECT id,email FROM ... Also, check out this basic SQL tutorial : http://www.sqlcourse.com/ It's fairly useful. regards, Philip On Tue, 13 Feb 2001, Peter Houchin wrote: > Hi, > > Can you have a SELECT stateme

Re: [PHP] SELECT options is null or not an object

2001-02-08 Thread Richard Lynch
SELECT options is null or not an object > Does anyone know why I get this error when selecting an option in the box? I think that's a JavaScript error message, no?... In a popup window rather than in the middle of your page... >

Re: [PHP] Select list with PHP

2001-02-05 Thread Richard Lynch
ittle time: http://chatmusic.com/volunteer.htm - Original Message - From: Gerry <[EMAIL PROTECTED]> To: Richard Lynch <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, February 04, 2001 10:23 AM Subject: Re: [PHP] Select list with PHP > This worked! > But, I

Re: [PHP] Select list with PHP/oops!

2001-02-04 Thread Gerry
Well I messed up... I forgot to add the final ";} at the bottom of my sample code but here it is. sorry! Gerry wrote: > > This worked! > But, I get this color selection increment on each subsequent menu where > the colors from the row above mix with the ones below and so on. Assume > that the nu

Re: [PHP] Select list with PHP

2001-02-04 Thread Gerry
This worked! But, I get this color selection increment on each subsequent menu where the colors from the row above mix with the ones below and so on. Assume that the numbers are the actual colors: Select a color: first menu1 next menu-> 1 next menu-> even longer

Re: [PHP] Select list with PHP

2001-02-03 Thread Richard Lynch
> while ($row = mysql_fetch_array($sql_result)) { > echo""; > echo $row["paint"]; > echo""; > echo $row["bucket"]; > echo""; > echo"http://www.\" method=\"POST\">"; > $Color = $row["Color"]; > if ($Color == $Color) { Here is one problem: You can't use $Color for the current color you are printi

Re: [PHP] Select list with PHP

2001-02-03 Thread Steve Edberg
At 3:24 PM -0700 2/3/01, Gerry wrote: >Hello: > >I'm trying to create dinamic color SELECT lists with php. I have my >database set up as follows: > >Paint = good >bucket = good >weight = 100kg >Colors = green, blue, red > >and here is my php: > >while ($row = mysql_fetch_array($sql_result)) { >ech

RE: [PHP] select prob.

2001-02-03 Thread PHPBeginner.com
no prob, --max -Original Message- From: Netbrain di M.L. [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 3:44 AM To: PHPBeginner.com Cc: [EMAIL PROTECTED] Subject: RE: [PHP] select prob. Yes, it seems a good solution :) thanks again max --- Please Help

RE: [PHP] select prob.

2001-02-03 Thread Netbrain di M.L.
EMAIL PROTECTED] > www.phpbeginner.com > > > > > -Original Message- > From: Netbrain di M.L. [mailto:[EMAIL PROTECTED]] > Sent: Sunday, February 04, 2001 3:34 AM > To: PHPBeginner.com > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] select prob. >

RE: [PHP] select prob.

2001-02-03 Thread PHPBeginner.com
nner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Netbrain di M.L. [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 3:34 AM To: PHPBeginner.com Cc: [EMAIL PROTECTED] Subject: RE: [PHP] select prob. x On Sun, 4 Feb 2001, PHPBeginner.com

RE: [PHP] select prob.

2001-02-03 Thread Netbrain di M.L.
x On Sun, 4 Feb 2001, PHPBeginner.com wrote: > then, why don't you instead have it NULL, like: > > > Select your country > --- > United State > United Kingdom > > > > then if it's empty it will be skipped ... I think ... I've never done so ... > > Ciao allo zio e la

Re: [PHP] select prob.

2001-02-03 Thread Christian Reiniger
On Saturday 03 February 2001 17:23, PHPBeginner.com wrote: > then, why don't you instead have it NULL, like: > > > Select your country > --- if no "value" is specified, the text in the field is taken as value, i.e. $form['country'] == "Select your country" etc -- Christian

RE: [PHP] select prob.

2001-02-03 Thread PHPBeginner.com
then, why don't you instead have it NULL, like: Select your country --- United State United Kingdom then if it's empty it will be skipped ... I think ... I've never done so ... Ciao allo zio e la lista italiana, Maxim Maletsky Founder, Chief Developer PHPBeginner.co

<    1   2   3