User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,577 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,407 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:

3 condition query

Join Date: Nov 2007
Posts: 2
Reputation: helpneeded is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
helpneeded helpneeded is offline Offline
Newbie Poster

Re: 3 condition query

  #3  
Nov 21st, 2007
 </form>

<?php


$condition1 = @$_GET['cond1'] ;
$condition2 = @$_GET['cond2'] ;
$condition3 = @$_GET[#cond3'] ;

mysql_connect("dbhost","dbuser","dbpass") or die("Unable to connect to server");; 
mysql_select_db("dbname") or die("Unable to select database"); 

$query = SELECT *, from paintings where artist = condition1 and period = condition2 and  value <= condition3 ;


 $numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);

if ($numrows == 0)
  {
  echo "<p>Sorry, nothing found that matches your request etc</p>";

Hi, thanks for that - I think Ive posted this correct

Ive added what you suggested how I think it should be written.. it seems awfully short yet sensible - can you confirm you think I have written it correctly.. after the huge number of errors my last attempt got, I thought Id check Im understanding you prior to trying it again.

Thanks again. Especially for the quick response..
Reply With Quote  
All times are GMT -4. The time now is 4:48 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC