Jump to content
  • 0

pomoc problém s MySQL


milous22

Dotaz

Zdravím, bol som donútený napísať help :) takže k veci...

 

Tento script mi nie a nie fungovať, neviete prečo?

Prvé query sa vykoná, takže pripojenie je v poriadku, ale druhé query & zistenie riadkov už nejak nefachá :think:

mysql_connect("localhost", "uzivatel", "databaza", "heslo");
if(mysql_ping() == 1){
mysql_debug(1);
print("[MYSQL]: Connection succesful!");
}else
print("[MYSQL]: [ERROR]: Connection failed!");

printf("query1 %i", mysql_function_query(1, "UPDATE `skuska` SET `cislo`='28' WHERE `id`='2'", false, "", ""));

printf("query2 %i", mysql_function_query(1, "SELECT * FROM `skuska` WHERE `meno`='fero'", false, "", ""));
mysql_store_result();
new rows, fields;
rows = mysql_num_rows();
fields = mysql_num_fields();
printf("vysledok = %i %i", rows, fields);
mysql_free_result();

konzola:

[MYSQL]: Connection succesful!
query1 1
query2 1
vysledok = -1 -1

tabuľka `skuska`:

503794be6d.f.png

Čo robím zle? Prosím, pomôžte.

Link to comment
Share on other sites

0 odpovědí na tuto otázku

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...