Solved

Query question !!!

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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 …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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