Solved

Query question !!!

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mobile friendly link not working 4 265
FINDNOCASE 2 536
Download all files with one click 7 589
Regular Expressions find/replace needed 10 138
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 …
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

12 Experts available now in Live!

Get 1:1 Help Now