Re: Still trying to figure this out...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Damn.

Tack on this at the end:

$max_port = 2048;
for ($p = $last_port + 1; $p < $max_port; $p++) echo "$p is open<br
/>\n";


On Tue, June 20, 2006 1:37 am, Rob W. wrote:
> I still have not yet found anybody to help me with this. All the code
> that
> people have given me has not worked at all. I still get no output. So
> to add
> a little more to this, I'm gonna define how the database looks.
>
> ----------------------------------
> |    switchid        |    switchport     |
> ----------------------------------
> |            1          |             1          |
> |            1          |             2          |
> |            1          |             3          |
> |            1          |             4          |
> |            1          |             7          |
> |            1          |             10        |
> ----------------------------------
>
> ect so on and so forth. There are other switch id's in there as well
> along
> with their switch port's which sorting the other switchid's is not a
> problem. I also know the maximum amount for each switchid so that's
> not a
> problem as well. I need to be able to display the missing numbers in
> there.
> I have no extra spaces in there for blank numbers. After a server has
> been
> entered in to the database, it take's that number that was not shown
> previously in the database and enters it in, there for displaying it
> and not
> making it available for the next time another server is added. I have
> no way
> to alter the database as I am trying to clone a program and this is
> the only
> thing haning me up as of right now. If I can find someone to solve
> this
> problem for me, I will be glad to send money via paypal for helping
> out
> solving this problem as I have been on it for 2 days now and this is
> the
> last bit of code for this program that is holding me up. Please read
> below
> for more information on what I am doing.
>
> ----- Original Message -----
> From: "Rob W." <rob@xxxxxxxxxxxxxxx>
> To: <php-general@xxxxxxxxxxxxx>
> Sent: Monday, June 19, 2006 3:39 PM
> Subject:  Still trying to figure this out...
>
>
> Ok, I am still trying to get this figured out from what I tried doing
> last
> night. If anybody wants to try it, please be my guest. This is the
> deal.
> Create an INTEGER table. Put the numbers 1 - 24 in it. Leave out like
> number
> 8, 9, 22, 23 ect.. Now create a php statement that will take and pull
> that
> out of the database, find out the missing numbers and display them as
> an
> html drop down selection.
>
> And tedd in response to why, is because the values that are already
> located
> in the database represent in use already. They represent a server port
> that
> a server is sitting on, so that's not the problem. I could have done
> that
> along time ago.
>
> Any help is appreciated but here is the current code that I have.
>
>
>   $query="SELECT switchport FROM network";
>   $result=mysql_query($query);
>   $sql_range=mysql_fetch_array($result);
>   $true_range=range(1,24);
>   $next_range=array_diff($true_range,$sql_range);
>   foreach ($next_range as $final_range) {
>      echo "<option value='$final_range'>$final_range\n";
>   }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux