Solved

Query question !!!

Posted on 2006-11-08
5
178 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Simple PHP Upload Script 11 2,709
Read More links 12 344
installing adobe creative cloud offline 4 5,526
Site contents shift off page in IE 32 123
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…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now