The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MYSQL - table in sphere memory
Author Message
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #1
MYSQL - table in sphere memory
Hey fellas,
I've got an issue with SQL command.
Table: id(int,A_I, primary key), login(varchar(16)),heslo(varchar(16)),email(varchar(80)), and some 6 more columns... first name, last name, hash, date, approved, approved_client.

Quote:1, When I query this command "SELECT login FROM accounts WHERE approved='1'"
DB.ROW.NUMROWS = 1
DB.ROW.NUMCOLS = 1
DB.ROW.0.0 = :actual login name:
DB.ROW.0.login = :actual login name:
=> it works.

Quote:2, "SELECT login,heslo FROM accounts WHERE approved='1'"
DB.ROW.NUMROWS = 1
DB.ROW.NUMCOLS = 2
DB.ROW.0.0 = :actual login name:
DB.ROW.0.login = :actual login name:
DB.ROW.0.1 = :actual heslo:
DB.ROW.0.heslo = <--------------- returns nothing
=> it somehow works with indexes.

Quote:3, "SELECT login,heslo,email FROM accounts WHERE approved='1'"
DB.ROW.NUMROWS = 1
DB.ROW.NUMCOLS = 3
DB.ROW.0.0 = :actual login name:
DB.ROW.0.login = :actual login name:
DB.ROW.0.1 = :actual heslo:
DB.ROW.0.heslo = <--------------- returns nothing
DB.ROW.0.2 = <--------------- returns nothing
DB.ROW.0.email = <--------------- returns nothing
=> can't access data from more than 2 columns

Release 0.56c, 31. August
Ideas what might be the problem? When I use "SELECT *", it says it has 10 columns but I can access only the first column with index or name and the second only with index.
(This post was last modified: 09-26-2014 07:17 PM by Alaric.)
09-26-2014 07:14 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #2
RE: MYSQL - table in sphere memory
Why are you setting NUMROWS and NUMCOLS?
Remove those 2 lines and it should all work fine.

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-27-2014 03:52 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #3
RE: MYSQL - table in sphere memory
I don't set anything. It's the output. It was just information what it returns. Not declaration.

Real code:
Code:
DB.QUERY "SELECT id,login,heslo,email FROM `ucty_zadosti`"
IF <DB.ROW.NUMROWS>
   serv.b DEBUG: <DB.ROW.0.0>
   serv.b DEBUG: <DB.ROW.0.1>
   serv.b DEBUG: <DB.ROW.0.2>
   serv.b DEBUG: <DB.ROW.0.3>
   serv.b DEBUG: <DB.ROW.0.id>
   serv.b DEBUG: <DB.ROW.0.login>
   serv.b DEBUG: <DB.ROW.0.heslo>
   serv.b DEBUG: <DB.ROW.0.email>
ENDIF
output:
Code:
DEBUG: 115
DEBUG: Alaric
DEBUG:
DEBUG:
DEBUG: 115
DEBUG:
DEBUG:
DEBUG:
(This post was last modified: 09-27-2014 05:34 AM by Alaric.)
09-27-2014 05:19 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: MYSQL - table in sphere memory
Maybe your language system is the problem... Or your table don't have the data.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 09-27-2014 06:30 AM by Extreme.)
09-27-2014 06:07 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)