Why Python don't return the data when passing parameters?Python join: why is it string.join(list) instead of list.join(string)?Why are Python lambdas useful?Why do people write the #!/usr/bin/env python shebang on the first line of a Python script?Why can't Python parse this JSON data?How do I add indices to MySQL tables?MySQL > Table doesn't exist. But it does (or it should)Why is reading lines from stdin much slower in C++ than Python?“Large data” work flows using pandasWhy is “1000000000000000 in range(1000000000000001)” so fast in Python 3?MySQL doesn't return any row from second query onwards

Creating two special characters

Is there any evidence that Cleopatra and Caesarion considered fleeing to India to escape the Romans?

How to get directions in deep space?

Is there a RAID 0 Equivalent for RAM?

Why does this expression simplify as such?

Why is the Sun approximated as a black body at ~ 5800 K?

Why do ¬, ∀ and ∃ have the same precedence?

Why should universal income be universal?

PTIJ: Why is Haman obsessed with Bose?

What fields between the rationals and the reals allow a good notion of 2D distance?

Does Doodling or Improvising on the Piano Have Any Benefits?

Is there a nicer/politer/more positive alternative for "negates"?

How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

How to draw a matrix with arrows in limited space

Permission on Database

How does electrical safety system work on ISS?

Can I cause damage to electrical appliances by unplugging them when they are turned on?

Does "he squandered his car on drink" sound natural?

I found an audio circuit and I built it just fine, but I find it a bit too quiet. How do I amplify the output so that it is a bit louder?

Doesn't the system of the Supreme Court oppose justice?

Non-trope happy ending?

Quoting Keynes in a lecture

How do you make your own symbol when Detexify fails?



Why Python don't return the data when passing parameters?


Python join: why is it string.join(list) instead of list.join(string)?Why are Python lambdas useful?Why do people write the #!/usr/bin/env python shebang on the first line of a Python script?Why can't Python parse this JSON data?How do I add indices to MySQL tables?MySQL > Table doesn't exist. But it does (or it should)Why is reading lines from stdin much slower in C++ than Python?“Large data” work flows using pandasWhy is “1000000000000000 in range(1000000000000001)” so fast in Python 3?MySQL doesn't return any row from second query onwards













-1















I'm having problems with querys agains MySQL 8.0 and I'm desesperated. If I run the query in MySQL I've got 893 rows, but If I make the query with Python I've got only 67 rows. Why?



I don't understand anything :(



I have checked that If I make a query like this:



select * from table_name



Python and MySQL returns the same amount of data. So, it works fine. But, If I try to filter data throw a field then, MySQL returns the data correctly but python not.



For example: select * from table_name were id = 5



In this case, MySQL returns the data correctly but Python returns only part of the data and not all. Why? What am I doing wrong?



Edit I:



I have made several test and I see that If I make a query with one table this querys works fine always. But, when I join two tables and pass a param, then works in MySQL but the result returned by python is not correct.



The code is:



connection = pymysql.connect(host = DDBB.DDBB_FIBA_HOST,
user = DDBB.DDBB_FIBA_USER,
password = DDBB.DDBB_FIBA_PSWD,
db = DDBB.DDBB_FIBA_NAME,
charset = DDBB.DDBB_FIBA_CHARSET,
cursorclass=pymysql.cursors.DictCursor)
with connection.cursor() as cursor:
totalRows = cursor.execute("select sc.* from tbl030_shots_chart sc, tbl006_player_team pt where sc.id_fiba = pt.id_player_feb and pt.id_team_club = %s", [5])
print("Total Rows: " + str(totalRows))


This, print "Total Rows: 76", however MySQL give us the correct return with 1030 rows:



enter image description here



What happen?



Edit II:



I have found the problem, but I don't know how to solve it. The problem is due to the join of the table tbl030_shots_chart and tbl006_player_team by the fields id_fiba and if_player_feb. These fields has the same value, but only returns data correctly for one player, for other players works fine in MySQL but not in python.



This is the structre of the each table:



tbl030_shots_chart
enter image description here



tbl006_player_team
enter image description here



What happen?










share|improve this question



















  • 1





    You need to actually show your Python code, and the output.

    – Daniel Roseman
    14 hours ago






  • 1





    "What am I doing wrong?" => well, not posting a MCVE for a start ? (stackoverflow.com/help/mcve)

    – bruno desthuilliers
    14 hours ago












  • Hi @DanielRoseman I have updated my original post with code and the output

    – José Carlos
    13 hours ago















-1















I'm having problems with querys agains MySQL 8.0 and I'm desesperated. If I run the query in MySQL I've got 893 rows, but If I make the query with Python I've got only 67 rows. Why?



I don't understand anything :(



I have checked that If I make a query like this:



select * from table_name



Python and MySQL returns the same amount of data. So, it works fine. But, If I try to filter data throw a field then, MySQL returns the data correctly but python not.



For example: select * from table_name were id = 5



In this case, MySQL returns the data correctly but Python returns only part of the data and not all. Why? What am I doing wrong?



Edit I:



I have made several test and I see that If I make a query with one table this querys works fine always. But, when I join two tables and pass a param, then works in MySQL but the result returned by python is not correct.



The code is:



connection = pymysql.connect(host = DDBB.DDBB_FIBA_HOST,
user = DDBB.DDBB_FIBA_USER,
password = DDBB.DDBB_FIBA_PSWD,
db = DDBB.DDBB_FIBA_NAME,
charset = DDBB.DDBB_FIBA_CHARSET,
cursorclass=pymysql.cursors.DictCursor)
with connection.cursor() as cursor:
totalRows = cursor.execute("select sc.* from tbl030_shots_chart sc, tbl006_player_team pt where sc.id_fiba = pt.id_player_feb and pt.id_team_club = %s", [5])
print("Total Rows: " + str(totalRows))


This, print "Total Rows: 76", however MySQL give us the correct return with 1030 rows:



enter image description here



What happen?



Edit II:



I have found the problem, but I don't know how to solve it. The problem is due to the join of the table tbl030_shots_chart and tbl006_player_team by the fields id_fiba and if_player_feb. These fields has the same value, but only returns data correctly for one player, for other players works fine in MySQL but not in python.



This is the structre of the each table:



tbl030_shots_chart
enter image description here



tbl006_player_team
enter image description here



What happen?










share|improve this question



















  • 1





    You need to actually show your Python code, and the output.

    – Daniel Roseman
    14 hours ago






  • 1





    "What am I doing wrong?" => well, not posting a MCVE for a start ? (stackoverflow.com/help/mcve)

    – bruno desthuilliers
    14 hours ago












  • Hi @DanielRoseman I have updated my original post with code and the output

    – José Carlos
    13 hours ago













-1












-1








-1








I'm having problems with querys agains MySQL 8.0 and I'm desesperated. If I run the query in MySQL I've got 893 rows, but If I make the query with Python I've got only 67 rows. Why?



I don't understand anything :(



I have checked that If I make a query like this:



select * from table_name



Python and MySQL returns the same amount of data. So, it works fine. But, If I try to filter data throw a field then, MySQL returns the data correctly but python not.



For example: select * from table_name were id = 5



In this case, MySQL returns the data correctly but Python returns only part of the data and not all. Why? What am I doing wrong?



Edit I:



I have made several test and I see that If I make a query with one table this querys works fine always. But, when I join two tables and pass a param, then works in MySQL but the result returned by python is not correct.



The code is:



connection = pymysql.connect(host = DDBB.DDBB_FIBA_HOST,
user = DDBB.DDBB_FIBA_USER,
password = DDBB.DDBB_FIBA_PSWD,
db = DDBB.DDBB_FIBA_NAME,
charset = DDBB.DDBB_FIBA_CHARSET,
cursorclass=pymysql.cursors.DictCursor)
with connection.cursor() as cursor:
totalRows = cursor.execute("select sc.* from tbl030_shots_chart sc, tbl006_player_team pt where sc.id_fiba = pt.id_player_feb and pt.id_team_club = %s", [5])
print("Total Rows: " + str(totalRows))


This, print "Total Rows: 76", however MySQL give us the correct return with 1030 rows:



enter image description here



What happen?



Edit II:



I have found the problem, but I don't know how to solve it. The problem is due to the join of the table tbl030_shots_chart and tbl006_player_team by the fields id_fiba and if_player_feb. These fields has the same value, but only returns data correctly for one player, for other players works fine in MySQL but not in python.



This is the structre of the each table:



tbl030_shots_chart
enter image description here



tbl006_player_team
enter image description here



What happen?










share|improve this question
















I'm having problems with querys agains MySQL 8.0 and I'm desesperated. If I run the query in MySQL I've got 893 rows, but If I make the query with Python I've got only 67 rows. Why?



I don't understand anything :(



I have checked that If I make a query like this:



select * from table_name



Python and MySQL returns the same amount of data. So, it works fine. But, If I try to filter data throw a field then, MySQL returns the data correctly but python not.



For example: select * from table_name were id = 5



In this case, MySQL returns the data correctly but Python returns only part of the data and not all. Why? What am I doing wrong?



Edit I:



I have made several test and I see that If I make a query with one table this querys works fine always. But, when I join two tables and pass a param, then works in MySQL but the result returned by python is not correct.



The code is:



connection = pymysql.connect(host = DDBB.DDBB_FIBA_HOST,
user = DDBB.DDBB_FIBA_USER,
password = DDBB.DDBB_FIBA_PSWD,
db = DDBB.DDBB_FIBA_NAME,
charset = DDBB.DDBB_FIBA_CHARSET,
cursorclass=pymysql.cursors.DictCursor)
with connection.cursor() as cursor:
totalRows = cursor.execute("select sc.* from tbl030_shots_chart sc, tbl006_player_team pt where sc.id_fiba = pt.id_player_feb and pt.id_team_club = %s", [5])
print("Total Rows: " + str(totalRows))


This, print "Total Rows: 76", however MySQL give us the correct return with 1030 rows:



enter image description here



What happen?



Edit II:



I have found the problem, but I don't know how to solve it. The problem is due to the join of the table tbl030_shots_chart and tbl006_player_team by the fields id_fiba and if_player_feb. These fields has the same value, but only returns data correctly for one player, for other players works fine in MySQL but not in python.



This is the structre of the each table:



tbl030_shots_chart
enter image description here



tbl006_player_team
enter image description here



What happen?







python mysql pymysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 12 hours ago







José Carlos

















asked 14 hours ago









José CarlosJosé Carlos

72222049




72222049







  • 1





    You need to actually show your Python code, and the output.

    – Daniel Roseman
    14 hours ago






  • 1





    "What am I doing wrong?" => well, not posting a MCVE for a start ? (stackoverflow.com/help/mcve)

    – bruno desthuilliers
    14 hours ago












  • Hi @DanielRoseman I have updated my original post with code and the output

    – José Carlos
    13 hours ago












  • 1





    You need to actually show your Python code, and the output.

    – Daniel Roseman
    14 hours ago






  • 1





    "What am I doing wrong?" => well, not posting a MCVE for a start ? (stackoverflow.com/help/mcve)

    – bruno desthuilliers
    14 hours ago












  • Hi @DanielRoseman I have updated my original post with code and the output

    – José Carlos
    13 hours ago







1




1





You need to actually show your Python code, and the output.

– Daniel Roseman
14 hours ago





You need to actually show your Python code, and the output.

– Daniel Roseman
14 hours ago




1




1





"What am I doing wrong?" => well, not posting a MCVE for a start ? (stackoverflow.com/help/mcve)

– bruno desthuilliers
14 hours ago






"What am I doing wrong?" => well, not posting a MCVE for a start ? (stackoverflow.com/help/mcve)

– bruno desthuilliers
14 hours ago














Hi @DanielRoseman I have updated my original post with code and the output

– José Carlos
13 hours ago





Hi @DanielRoseman I have updated my original post with code and the output

– José Carlos
13 hours ago












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280116%2fwhy-python-dont-return-the-data-when-passing-parameters%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280116%2fwhy-python-dont-return-the-data-when-passing-parameters%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현