Solved

Query question !!!

Posted on 2006-11-08
5
208 Views
Last Modified: 2010-04-25
iam building web site PHP and  mySQl
i use dream weaver

i want to make a query using dream weaver to catch memebers from data base where "user_level" = "admin" OR "memeber"


but the wezard only give me one option to chose

i have to chose only "admin" or "member"

hot to modify this so i can co=hose both admin and memeber


thanks experts

FLAASHER

0
Comment
Question by:FLAASHER
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17904482
Hi FLAASHER,

Just modify the SQL in code view to add the OR clause.

If you post the PHP, I can show you exactly what I mean.
0
 
LVL 13

Author Comment

by:FLAASHER
ID: 17904530
here is th code :


<?php

mysql_select_db($database_flashawy, $flashawy);
$query_rsMemeber = "SELECT user_id, user_fullname, user_takhasos, user_khebra FROM users WHERE user_level = 'member'";
$rsMemeber = mysql_query($query_rsMemeber, $flashawy) or die(mysql_error());
$row_rsMemeber = mysql_fetch_assoc($rsMemeber);
$totalRows_rsMemeber = mysql_num_rows($rsMemeber);
?>



here is the problem :

WHERE user_level = 'member'


i want it member or admin ..... not member only


FLAASHER
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 17904552
$query_rsMemeber = "SELECT user_id, user_fullname, user_takhasos, user_khebra FROM users WHERE user_level = 'member' OR user_level = 'admin'";

0
 
LVL 13

Author Comment

by:FLAASHER
ID: 17904611
Thanks jason

0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17904618
No problem
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question