![]() |
List all items in a SQL table?
I have been working on a support system where users can enter in a question for staff to answer about the server, my question is, how can I list all the rows in a table?
Would it be possible using a scroll as a container and a text list? something maybe even to get all rows SELECT * FROM Support then a for loop with like PHP Code:
|
It sounds like you don't have a good understanding of SQL concepts. You should try reading some tutorials for SQLite or even MySQL online. Unlike what you've been doing thus far, SQL is very easy to do terribly and horribly wrong if you're just copying and pasting from examples you've found/are given.
PHP Code:
|
I have read some things and understand how to use SQLite, it's rather easy.
W3 schools had a good example which I learnt most of it from. But I was just unsure on how to get all the rows. And I take it with you're example you'd send it to the client then do a for loop and then just get like temp.rows.size and add rows into a text list? Thanks! And the only really thing I think I'm doing wrong is where it has like var char null by default and crap like that. |
Quote:
Quote:
|
Quote:
|
On a related note, I have made a system now, but I want to replace a value.
insert into etc isn't replacing it at all and I don't know how delete works or drop. Can anyone possible help? |
Quote:
|
Thanks, Looking into it now.
|
You might also want to escape any user entered text. So as to not allow for SQL Injections.
|
All times are GMT +2. The time now is 07:31 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.