Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16056
| Newsgroups | comp.lang.php |
|---|---|
| Date | 2016-01-02 03:18 -0800 |
| Message-ID | <43088977-4e12-4d58-a977-aa114e491069@googlegroups.com> (permalink) |
| Subject | How to retreive data from row and show it as link in a page |
| From | androidmaroso@gmail.com |
Hello everyone,
i've spent all night searching how to do what for you is a simple task!
I have a mysql database with a table calles iptable with id, ip, timestamp fields.
The table receives data with new ip's every time the ip changes.
I would like to retrieve the last IP received and show it as a link.
For example :
id=1 ip=192.168.1.20
id=2 ip=192.168.1.21
id=3 ip=192.168.1.52
i would like to show as a link the id n.3 in this example.
I've done this but without results :
$link=Connection();
$ultimoip=mysql_query("SELECT * FROM `iptable` ORDER BY `id` DESC limit 1",$link);
if($ultimoip!==FALSE){
while($row = mysql_fetch_array($ultimoip)) {
printf($row["ip"]);
echo '<a href="' . $row["ip"] . '">IP Attuale</a>';
}
mysql_free_result($ultimoip);
can anyone help me please?
Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread
How to retreive data from row and show it as link in a page androidmaroso@gmail.com - 2016-01-02 03:18 -0800
Re: How to retreive data from row and show it as link in a page androidmaroso@gmail.com - 2016-01-02 03:43 -0800
Re: How to retreive data from row and show it as link in a page Arno Welzel <usenet@arnowelzel.de> - 2016-01-02 14:49 +0100
Re: How to retreive data from row and show it as link in a page androidmaroso@gmail.com - 2016-01-04 11:57 -0800
Re: How to retreive data from row and show it as link in a page Arno Welzel <usenet@arnowelzel.de> - 2016-01-04 22:56 +0100
csiph-web