Re: [PHP-DB] Multiple SELECT

2004-07-13 Thread Pablo M. Rivas
Hello Marcjon, do this: SELECT forumusers.*, forumuserprofiles.* from .$godlyness['database_database']..forumusers LEFT JOIN .$godlyness['database_database']..forumuserprofiles ON forumusers.username = forumusersprofiles.username where order by so.. if you do: where

Re: [PHP-DB] Multiple select box using mysql

2003-02-26 Thread Jason End
Yeah, I think I am going to reconsider the software box. The idea I have now is to have an Add Expert link attached to each software entry, which will then load a page to add experts to that piece of software. The page could contain two select boxes, one with a list of all experts, and one with a

Re: [PHP-DB] Multiple select box using mysql

2003-02-24 Thread Jason End
But how do I populate the array with (for e.g.) 2 fields from a mysql table. Each line of the select box needs to hold the Name and Version of the piece of software, the results from a: select Name, Version from software -s- --- Corne' Cornelius [EMAIL PROTECTED] wrote: You have to give the

Re: [PHP-DB] Multiple select box using mysql

2003-02-24 Thread Mark
I'm not sure if anyone answered this for you, and perhaps I'm missing something. Are you simply trying to populate a multi-select box with MySQL data? If so, try this: echo form tag here... echo SELECT NAME=\software[]\ MULTIPLE SIZE=5; $query=select ID, Name, Version from software;

Re: [PHP-DB] Multiple select box using mysql

2003-02-18 Thread Corne' Cornelius
You have to give the Mutli select box a name as an array. eg: SELECT NAME=experts[] MULTIPLE SIZE=5 OPTION VALUE=key1val1/OPTION /SELECT then in PHP, you can access $experts as an array. while (list ($key, $val) = each($experts)) { print $key = $valBR\n; } Jason End wrote: I writing a

Re: [PHP-DB] Multiple select

2002-10-01 Thread Jeffrey_N_Dyke
use select name = 'listbox1[]' multiple this will send an array to your script. |---| | Jeff | KeaneIT - Presidents | | Landing | Suite: 200 | |Outside: 617 -517-1772 | | | E-mail: [EMAIL PROTECTED] | |[ Mailing: 10 Presidents | |

RE: [PHP-DB] Multiple select

2002-10-01 Thread Hutchins, Richard
rename your select lists with array brackets at the end 'listbox1[]' all of your values will be passed to the next page as an array -Original Message- From: Wilmar Perez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 12:47 PM To: php-db mailing list Subject: [PHP-DB]

Re: [PHP-DB] Multiple select ?

2002-08-01 Thread Jason Wong
On Thursday 01 August 2002 17:06, Dave Carrera wrote: Hi All I have a situation where I need to do select on my mysql db. Here is what I am trying to do Select * from table_name where col1=1 and col2=1 and col3=0 But this refuses to work. How does it refuse to work? Any error messages?

RE: [PHP-DB] Multiple SELECT querys

2002-03-22 Thread Rick Emery
$query = SELECT myvalue FROM mytable WHERE some_condition; $result = mysql_query($query) or die(Error: .mysql_error()); $srch = ; while( list($myvalue) = mysql_fetch_array($result) { $srch .= $myvalue, ; } $srch = substr($srch, 0, -2); $query = SELECT * FROM other_table WHERE this_val

RE: [PHP-DB] multiple select statements

2002-03-05 Thread Shrock, Court
Try creating your input with names that php will create arrays from, then you can simply join the array elements if they are non-empty with something like OR $key='$val'. An example: form input type=text name=filter[haircolor] input type=checkbox name=filter[registered] value='Y' /form

Re: [PHP-DB] Multiple select list box to search mysql database

2002-01-01 Thread Bogdan Stancescu
In HTML: SELECT name=manufacturernames[] multiple (note the name has PHP-like array definition) In PHP: for ($i=0;$isizeOf($manufacturernames);$i++) { if ($i==0) { $q_cond=where; } else { $q_cond=or; } $query.=$q_cond MANUFACTURER LIKE '$manufacturernames[$i]'; } Gisele Grenier

Re: [PHP-DB] Multiple select list box to search mysql database

2002-01-01 Thread Bogdan Stancescu
Bogdan Stancescu wrote: In HTML: SELECT name=manufacturernames[] multiple (note the name has PHP-like array definition) In PHP: for ($i=0;$isizeOf($manufacturernames);$i++) { if ($i==0) { $q_cond=where; } else { $q_cond=or; } $query.=$q_cond MANUFACTURER LIKE