You are here: problems - newbe « PHP Language « IT news, forums, messages
problems - newbe

Posted by Marceli Zaic on 06/17/05 14:36

hi,
i'm newbe in this and i've problems
i create page and connect to mysql server (also own build)
i've problem with:
1. online user ,
2. counter


kod:
.....
<?php
$linkowanie = @mysql_connect("localhost","jurek","ogorek");
if (!empty($linkowanie))
{
if(mysql_select_db("myslaw" , $linkowanie)==true)
{
$asql = "select * from opona";
$aresult= mysql_query($asql,$linkowanie);
if ($aresult==true)
{
while($arow=mysql_fetch_array($aresult))
{
$aNumer = $arow["suma"];
}
mysql_free_result($aresult);
}
$assql = "UPDATE opona SET suma=$aNumer+1";
$asresult= mysql_query($assql,$linkowanie);
if ($asresult==true)
{
$aqresult=mysql_insert_id($linkowanie);
}
}

}
mysql_close($linkowanie);
?>....
......
<?php
print("$aNumer");
mysql_free_result($aqresult);
?>
unfortunatelly the first problem is to heavy for me i don't know how begin
it
the second problem - when i implement the code (over) i became this message

on top page
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource
in D:\Apache\Apache2\htdocs\index.php on line 178

in the place where the variable state

mysql_free_result(): supplied argument is not a valid MySQL result resource
in D:\Apache\Apache2\htdocs\index.php on line 279


P.S.can i also cut the mysql warnings from my page


any one could me help ?!?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация