Database query help PLEASE
Posted: Mon May 30, 2016 8:58 pm
This is the info that I am trying to extract from the database. I logged into phpmyadmin and all of this info is in the table.
Chapter50
recently thus knowingly originally wall argument summer regret watch earn imagine understood discreet torpid eminent ^
Chapter 50
Friendship, Thoroughly Challenging, Moderate Danger/Risk, Passed, 1(Honor), 4 (Honor), ^2^50^1^1^1^1^1^1^1^1
^false^0^1700^ ^2^2^2^2^2^2^2^2^false^0^0^ ^3^3^3^3^3^3^3^3^false^0^0^ ^4^4^4^4^4^4^4^4^false^0^0^ ^5^5^5^5^5^5^5^5^false^0^0^ ^6^6^6^6^6^6^6^6^false^0^0^ ^
I use this script:
local tTablename
global tSQL
global tData
on mouseUp
-- check the global connection ID to make sure we have a database connection
global gConnectionID
if gConnectionID is not a number then
answer error "Please connect to the database first."
exit to top
end if
-- construct the SQL (this selects all the data from the specified table)
put "Game4" into tTableName-- set this to the name of a table in your database
put "SELECT * FROM " & tTableName into tSQL
-- query the database
put revDataFromQuery(tab, cr, gConnectionID, tSQL) into tData
-- check the result and display the data or an error message
if item 1 of tData = "revdberr" then
answer error "There was a problem querying the database:" & cr & tData
else
put tData into field "Story" of card 2
end if
end mouseUp
And this is all the info I get in the application. It is significantly less than what is in the table
Chapter50
recently thus knowingly originally wall argument summer regret watch earn imagine understood discreet torpid eminent ^
Chapter 50
Friendship, Thoroughly Challenging, Moderate Danger/Risk, Passed, 1(Honor), 4 (Honor), ^2^50^1^1^1^1^1^1^1^1
PLEASE help I'm really close to finishing my first project. I have been trying to fix this problem for 6 hours straight now
Chapter50
recently thus knowingly originally wall argument summer regret watch earn imagine understood discreet torpid eminent ^
Chapter 50
Friendship, Thoroughly Challenging, Moderate Danger/Risk, Passed, 1(Honor), 4 (Honor), ^2^50^1^1^1^1^1^1^1^1
^false^0^1700^ ^2^2^2^2^2^2^2^2^false^0^0^ ^3^3^3^3^3^3^3^3^false^0^0^ ^4^4^4^4^4^4^4^4^false^0^0^ ^5^5^5^5^5^5^5^5^false^0^0^ ^6^6^6^6^6^6^6^6^false^0^0^ ^
I use this script:
local tTablename
global tSQL
global tData
on mouseUp
-- check the global connection ID to make sure we have a database connection
global gConnectionID
if gConnectionID is not a number then
answer error "Please connect to the database first."
exit to top
end if
-- construct the SQL (this selects all the data from the specified table)
put "Game4" into tTableName-- set this to the name of a table in your database
put "SELECT * FROM " & tTableName into tSQL
-- query the database
put revDataFromQuery(tab, cr, gConnectionID, tSQL) into tData
-- check the result and display the data or an error message
if item 1 of tData = "revdberr" then
answer error "There was a problem querying the database:" & cr & tData
else
put tData into field "Story" of card 2
end if
end mouseUp
And this is all the info I get in the application. It is significantly less than what is in the table
Chapter50
recently thus knowingly originally wall argument summer regret watch earn imagine understood discreet torpid eminent ^
Chapter 50
Friendship, Thoroughly Challenging, Moderate Danger/Risk, Passed, 1(Honor), 4 (Honor), ^2^50^1^1^1^1^1^1^1^1
PLEASE help I'm really close to finishing my first project. I have been trying to fix this problem for 6 hours straight now