Προς το περιεχόμενο

MySql....


Azaroth

Προτεινόμενες αναρτήσεις

Δημοσ.

Geia sas. Exw to e3hs problhma. exw ftiaxnei mia database sthn MySql kai tha ithela na rotisw pws mporw na ftia3w mia selida pou na koitaei mesa sth database. dld na koitaei kai na mou emfanizei tis egrafes pou exw... :? mporei mipws na me boithisei kapios?

Δημοσ.

basika mporei na mi to diatiposa swsta to parapanw erwthma mou. auto pou thelw na kanw einai na ftia3w ena egrafo html to opio na emfanizei se morfh pinaka an ginete kati tetoio to e3hs erwthma ths MySql:

 

SELECT `code` , `title` , `quality` , `media` , `category` , `serial`

FROM `titles`

WHERE 1 AND `category`

LIKE 'Pc Games'

ORDER BY `title` ASC LIMIT 0 , 100

 

Eyxaristw ek twn proterwn!

Δημοσ.
basika mporei na mi to diatiposa swsta to parapanw erwthma mou. auto pou thelw na kanw einai na ftia3w ena egrafo html to opio na emfanizei se morfh pinaka an ginete kati tetoio to e3hs erwthma ths MySql:

 

SELECT `code` ' date=' `title` , `quality` , `media` , `category` , `serial`

FROM `titles`

WHERE 1 AND `category`

LIKE 'Pc Games'

ORDER BY `title` ASC LIMIT 0 , 100

 

Eyxaristw ek twn proterwn![/quote']

 

>
<html>
<body>
<table>
<?php
mysql_connect("localhost");
mysql_select_db("to onoma tis db sou");

$sql = "SELECT code,title,quality,media,category,serial FROM titles 
          WHERE 1 AND category LIKE Pc Games ORDER BY title ASC LIMIT 0 , 100";
$result = mysql_query($sql);
while ($arr = mysql_fetch_array($result)) {
               $code = $arr['code'];
$title = $arr['title'];
$quality = $arr['quality'];
$media = $arr['media'];
$category = $arr['category'];
$serial = $arr['serial'];
?>
<tr>
<td><?php echo "<b>CODE:</b>";?></td>
<td><?php echo $code;?></td>
</tr>
<tr>
<td><?php echo "<b>TITLE:</b>";?></td>
<td><?php echo $title;?></td>
</tr>
<tr>
<td><?php echo "<b>QUALITY:</b>";?></td>
<td><?php echo $quality;?></td>
</tr>
<tr>
<td><?php echo "<b>MEDIA:</b>";?></td>
<td><?php echo $media;?></td>
</tr>
<tr>
<td><?php echo "<b>CATEGORY:</b>";?></td>
<td><?php echo $category;?></td>
</tr>
<tr>
<td><?php echo "<b>SERIAL:</b>";?></td>
<td><?php echo $serial;?></td>
</tr>
<?php } ?>
</table>
</body>
</html>

Δημοσ.

Geia sas na kano kai ego mia erotisi. Prospatho na kano update kai exo to eksis:

 

>
$query2 = "UPDATE employee SET ORDE='".$HTTP_GET_VARS['ORDE1']."' where AM='".$row["AM"]."'";
$result1 = mysql_query($query2);
if (mysql_affected_rows() == 0)
{
echo "query did nothing";
}
$num_results1 = mysql_affected_rows($result1);

$row1 = mysql_fetch_array($result1);

 

to opoio mou petaei tis proeidopoiiseis Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in c:\program files\apache group\apache\htdocs\baseis\wupdate.php on line 265

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\program files\apache group\apache\htdocs\baseis\wupdate.php on line 267

 

alal den katalabaino ti ginete akribos. i plaka einai oti kanei kanonika update. ti na kano??

Euxaristo poli.

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...