Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About mysql
Author Message
Dullais
Journeyman
*

Posts: 65
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #1
About mysql
grr... Hello everyone (agin)
I just spend about 3 hours searching for answer about mysql and its usage, nowhere nothing was told about it. So finally i post my problem here.
Iam thinking about making another vendor system like wallmart, but not wallmart. (every client has his own vendor).
So my problem is: how do i return multiple values ? (from multiple rows) (i do know this is made by for). I can only get script to return last value, i need it to read all rows with my uid and make a list with thoes items.
I hope you could understand my pain and i'am sorry if something is not understandable in my text.
03-17-2013 01:07 AM
Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #2
RE: About mysql
PHP Code:
DB.QUERY "SELECT * FROM vendors ORDER BY price LIMIT 5"  //return maximum 5 items with lowest price

for <eval <db.row.numrows>>
    
serv.log <db.row.<local._for>.name>:<db.row.<local._for>.price>
endfor 
(This post was last modified: 03-17-2013 01:22 AM by Shaklaban.)
03-17-2013 01:21 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Dullais
Journeyman
*

Posts: 65
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #3
RE: About mysql
(03-17-2013 01:21 AM)Shaklaban Wrote:  
PHP Code:
DB.QUERY "SELECT * FROM vendors ORDER BY price LIMIT 5"  //return maximum 5 items with lowest price

for <eval <db.row.numrows>>
    
serv.log <db.row.<local._for>.name>:<db.row.<local._for>.price>
endfor 

So i made one like this
Code:
DB.QUERY "SELECT * FROM vendor_sys ORDER BY PRICE LIMIT 5"  //return maximum 5 items with lowest price

for 0 <eval <db.row.numrows>>
    serv.log <db.row.<local._for>.NAME>:<db.row.<local._for>.PRICE>
endfor

And it gives me:
17:36:(functions.scp,73):
17:36:(functions.scp,73):
17:36:(functions.scp,73):

From my neverendig lookings, There was dlocal not local, this one worked fine Smile
(This post was last modified: 03-17-2013 01:37 AM by Dullais.)
03-17-2013 01:34 AM
Find all posts by this user Like Post Quote this message in a reply
Fahrenait
Apprentice
*

Posts: 3
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Jan 2013
Reputation: 0

Elpida

Post: #4
RE: About mysql
for 0 <eval <db.row.numrows>>

must be

for 0 <eval <db.row.numrows>-1>
03-17-2013 11:24 AM
Visit this user's website 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)