Search found 1119 matches
- Tue Jul 07, 2015 11:32 am
- Forum: Advanced Help and Support
- Topic: IP Duplicate Search [RESOLVED]
- Replies: -1
- Views: 7631
Re: IP Duplicate Search
Probably not ideal, but try using LIKE %$ip% I tried this: $sql = "SELECT reg_ip, username FROM users WHERE reg_ip LIKE %$ip%> 1"; I get this: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\_atesting\admin\do_ip_search.php on line 44 W...
- Tue Jul 07, 2015 11:10 am
- Forum: Advanced Help and Support
- Topic: IP Duplicate Search [RESOLVED]
- Replies: -1
- Views: 7631
Re: IP Duplicate Search
I'm not too sure, but what is HAVING() lol? I have never used it so have you tried without it? Yeah, it's legitimate use in the context that I have it. And yah, I've tried with and without and all different ways. I personally don't see that my code is wrong, so I can't find out why it's not working...
- Tue Jul 07, 2015 5:38 am
- Forum: Advanced Help and Support
- Topic: IP Duplicate Search [RESOLVED]
- Replies: -1
- Views: 7631
Re: IP Duplicate Search
I believe it may be your GROUP BY parameter. If you change the GROUP BY to something unique it should grab and display all rows or just remove the GROUP BY kk, I tried without the group by and it just shows the one... grrrrr lol... Thx for the reply :) Also tried using the search post in the group ...
- Mon Jul 06, 2015 6:28 am
- Forum: Advanced Help and Support
- Topic: IP Duplicate Search [RESOLVED]
- Replies: -1
- Views: 7631
IP Duplicate Search [RESOLVED]
Hey all... Been working on some code to find all the duplicate IP's in the system. I have spent an entire day almost non stop and can't get the thing figured out. Here is what I am trying: $sql = "SELECT reg_ip, COUNT(*) as count, username FROM users WHERE reg_ip = '$ip' GROUP BY reg_ip HAVING ...
- Sat Jul 04, 2015 3:22 am
- Forum: Advanced Help and Support
- Topic: MYSQLI Admin Edit Table Question
- Replies: -1
- Views: 3436
Re: MYSQLI Admin Edit Table Question
TYTYKyleMassacre wrote:You can do something like:Code: Select all
$notAllowed = array(1,2,3,4); //put the user ids here you want to filter out if(!in_array($row['ID'],$notAllowed)) { //put all the goodies in here }
- Fri Jul 03, 2015 4:17 am
- Forum: Advanced Help and Support
- Topic: MYSQLI Admin Edit Table Question
- Replies: -1
- Views: 3436
MYSQLI Admin Edit Table Question
Okay you lovely guys and gals... Ran across an issue I can't figure out. I am creating an admin page that shows the usernames. By each username there is an edit image allowing the admin to edit the users information. Is there a way that it will not show the edit image in the echoed usernames so that...
- Tue Jun 30, 2015 7:58 am
- Forum: Advanced Help and Support
- Topic: Functions
- Replies: -1
- Views: 3929
Re: Functions
No worries, I just went ahead and did it using the form method and all is well. Thanks!
- Tue Jun 30, 2015 6:06 am
- Forum: Advanced Help and Support
- Topic: Functions
- Replies: -1
- Views: 3929
Re: Functions
Okay, I have put this together so far, but can't get it to display the selected username's information: <?php function user_dropdown($ddname = "username", $selected = -1) { $ret = "<select name='$ddname' type='dropdown'>"; $q = "SELECT * FROM users ORDER BY username ASC...
- Tue Jun 30, 2015 4:51 am
- Forum: Advanced Help and Support
- Topic: Functions
- Replies: -1
- Views: 3929
Re: Functions
Looks like good ol' MCCodes V1. When you use the function in a form like so: <form action="?action=editUser" method="post"> <?php echo user_dropdown("username"); ?> </form> You can then use it by doing something like this: <?php if(isset($_POST['username']) && ...
- Tue Jun 30, 2015 4:05 am
- Forum: Advanced Help and Support
- Topic: Functions
- Replies: -1
- Views: 3929
Functions
Hey all, been working on an admin area and created a function that will display a drop down, and allow you to select a user to edit. I've gotten as far as the function but don't know how to display the database information when the user is selected. Here is my function: function user_dropdown($ddnam...