Results 1 to 21 of 21
Hybrid View
-
11th November 2009 19:29 #1
-
11th November 2009 20:10 #2
-
11th November 2009 23:05 #3
-
11th November 2009 23:29 #4
Html . .
script- - php,java,c++ ..
Php MySql :
Code:<? $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); @mysql_select_db(" ", $link) or die(mysql_error()); $query = mysql_query("SELECT * FROM table'"); while($row = mysql_fetch_assoc($query)) { $result[] = $row; } ?> <table> <tr> <th> 1</th> <th> 2</th> <th> 3</th> </tr> <?php if(!empty($result)) { foreach ($result as $tableRow): ?> <tr> <td><?php echo $tableRow['row1'];?></td> <td><?php echo $tableRow['row2'];?></td> <td><?php echo $tableRow['row3'];?></td> </tr> <?php endforeach; } ?> </table>
-
12th November 2009 11:14 #5
-
12th November 2009 22:35 #6
-
12th November 2009 13:46 #7
-
12th November 2009 17:16 #8
-
12th November 2009 20:50 #9
, , . - php. , .
. MySQL, . .PHP Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<?php
$db_host = "ime_ili_ip_na_hosta"; // localhost
$db_name = "ime_na_bazata";
$db_username = "ime_na_usera";
$db_password = "parola";
$db_connection = @mssql_connect($db_host, $db_username, $db_password) or die(mssql_get_last_message());
if(!@mssql_select_db($db_name, $db_connection))
die(' .');
$table = 'ime_na_tablica';
$query = 'SELECT * FROM '.$table;
$res = @mssql_query($query);
if($res){
if(mssql_num_rows($res) > 0){
?>
<table border="1" cellspacing="0" cellpadding="1">
<tr>
<?php
$num_fields = mssql_num_fields($res);
for($i = 0; $i < $num_fields; $i++){
?>
<th><?php echo mssql_field_name($res, $i); ?></th>
<?php
}
?>
</tr>
<?php
while(($data = mssql_fetch_row($res)) == TRUE){
?>
<tr>
<?php
for($i = 0; $i < $num_fields; $i++){
?>
<td><?php echo $data[$i]?></td>
<?php
}
?>
</tr>
<?php
}
?>
</table>
<?php
}
else
echo ' .';
mssql_free_result($res);
}
else
echo mssql_get_last_message();
?>
</body>
</html>Last edited by Bombera; 12th November 2009 at 21:06.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
12th November 2009 23:25 #10
, ++ . .
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
13th November 2009 00:57 #11
-
13th November 2009 03:04 #12Registered User
Join Date: Oct:2006
Location: Plovdiv
Posts: 305
php - 5 ASP.NET :P - gridview connection, ( sql-a ) . Paging, Sorting - ...
Code:<asp:GridView runat="server" AutoGenerateColumns="True" ID="grid" AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" /> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnection %>" SelectCommand="SELECT * FROM MyTable"> </asp:SqlDataSource>
prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem?
-
13th November 2009 08:04 #13
. .
php , http://bg.php.net/ ( ).
-
13th November 2009 10:19 #14
, , . , HTML WYSIWYG .
- - , .. .
, , , , , . , , . , , . , .EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
13th November 2009 22:28 #15
-
14th November 2009 03:15 #16Registered User
Join Date: Oct:2006
Location: Plovdiv
Posts: 305
Last edited by DiadoMraz; 14th November 2009 at 03:24.
prepBut nI vrbLike adjHungarian! qWhat's artThe adjBig nProblem?
-
14th November 2009 00:01 #17
, .
:
, $=4, . . unset($a).PHP Code:for($i = 1; $i < 5; $i++){
$a = $i;
}
echo $a;
, -, .
, , .
- , PHP. .
, , , , ., .
, , , - , , .EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
14th November 2009 04:08 #18
.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
14th November 2009 09:29 #19
-
14th November 2009 11:35 #20
-, ( ) , query.
, , while-, $row .
E, , .Code:<? $link = mysql_connect('localhost', 'user', 'password'); @mysql_select_db("DB_NAME", $link) or die(mysql_error()); $query = mysql_query("SELECT * FROM `users`"); if ($query) { if (mysql_num_rows($query) > 0) { echo '<table><tr>'; $cnt = 0; while($row = mysql_fetch_assoc($query)) { if ($cnt == 2) { echo '</tr><tr>'; $cnt = 0; } echo '<td>'.$row['name']."</td>"; $cnt++; } echo '</tr></table>'; }else { echo 'No users in db!'; } }else { echo 'broken query!'; } ?>
Last edited by BornToDrink; 14th November 2009 at 11:42.
Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
.
-
14th November 2009 14:50 #21EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|




Reply With Quote

.

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in