Advertisement
Advertisement
| 05.09.2008 at 04:46AM PDT, ID: 23388955 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.09.2008 at 04:59AM PDT, ID: 21531875 |
| 05.09.2008 at 05:06AM PDT, ID: 21531916 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: |
<?php
$query = "
SELECT
table1.*,
table2.*,
table3.*
FROM
table1, table2, table3
WHERE
table1.username = '$username' AND table1.password = '$password' OR
table2.username = '$username' AND table2.password = '$password' OR
table3.username = '$username' AND table3.password = '$password'
";
$result = mysql_query($query);
if (mysql_num_rows($result)){
# We good to go
}
?>
|
| 05.09.2008 at 07:23AM PDT, ID: 21533110 |
| 05.09.2008 at 07:24AM PDT, ID: 21533117 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: |
$n=0;
for($i=1;$i<=8;$i++)
{
$query = " SELECT * FROM `table{$i}` WHERE `username`='{$username}' and `pass`='{$pass}'";
$result_set = mysql_query($query);
$n = $n + mysql_num_rows($result_set);
}
if($n!=0)
{
// user exists
}
|
| 05.10.2008 at 02:23AM PDT, ID: 21538324 |
| 05.10.2008 at 04:08AM PDT, ID: 21538485 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
$n=0;
//initialize array
$tables = array();
//push table names
$tables[]='table1';
$tables[]='table2';
$tables[]='table3';
//loop on tables
foreach($tables as $table)
{
$query = " SELECT * FROM `{$table}` WHERE `username`='{$username}' and `pass`='{$pass}'";
$result_set = mysql_query($query);
$n = $n + mysql_num_rows($result_set);
}
if($n!=0)
{
// user exists
}
|