-
Edited SQL select between 10 to 20 last results by ID
SELECT blabla FROM a INNER JOIN b ON a.a = b.b Is what I have. However I'd like to sort the results DESC by ID. I'd like to select last … -
Created SQL select between 10 to 20 last results by ID
SELECT blabla FROM a INNER JOIN b ON a.a = b.b Is what I have. However I'd like to sort the results DESC by ID. I'd like to select last … -
Began Watching SQL select between 10 to 20 last results by ID
SELECT blabla FROM a INNER JOIN b ON a.a = b.b Is what I have. However I'd like to sort the results DESC by ID. I'd like to select last … -
Marked Solved Status for Unknown column ---' in 'field list'
`Unknown column 'topics.id' in 'field list'` `SELECT topics.id topicId,` [...] `topics.id` DOES exist. -
Replied To a Post in Unknown column ---' in 'field list'
SELECT topics.id topicId, topics.name topicName, topics.closed topicClosed, forums.lastTopicId forumLastTopicId, forums.topicCount forumTopicCount, forums.description forumDescription FROM forums INNER JOIN members ON forums.lastPoster = members.id The query isn't working at all, so I … -
Replied To a Post in Unknown column ---' in 'field list'
`SHOW CREATE TABLE topics` +--------+-----------------------------------------------+ | Table | Create Table | +--------+-----------------------------------------------+ | topics | CREATE TABLE `topics` ( `id` int(9) NOT NULL | | | AUTO_INCREMENT, `name` varchar(24) | … -
Replied To a Post in Unknown column ---' in 'field list'
Yes, I know. Table `topics` and within column `id` exists. This error occurs. -
Created Unknown column ---' in 'field list'
`Unknown column 'topics.id' in 'field list'` `SELECT topics.id topicId,` [...] `topics.id` DOES exist. -
Began Watching Unknown column ---' in 'field list'
`Unknown column 'topics.id' in 'field list'` `SELECT topics.id topicId,` [...] `topics.id` DOES exist. -
Marked Solved Status for Code continues execution even after header redirect
I don't think it's code-bound, but here's the code: http://pastebin.com/yWJ5qpwN What happens is... I input 2 different passwords, line 22 is for some reason entirely skipped. The script passes every … -
Edited Code continues execution even after header redirect
I don't think it's code-bound, but here's the code: http://pastebin.com/yWJ5qpwN What happens is... I input 2 different passwords, line 22 is for some reason entirely skipped. The script passes every … -
Created Code continues execution even after header redirect
I don't think it's code-bound, but here's the code: http://pastebin.com/yWJ5qpwN What happens is... I input 2 different passwords, line 22 is for some reason entirely skipped. The script passes every … -
Began Watching Code continues execution even after header redirect
I don't think it's code-bound, but here's the code: http://pastebin.com/yWJ5qpwN What happens is... I input 2 different passwords, line 22 is for some reason entirely skipped. The script passes every … -
Marked Solved Status for How to automatically create dummy content?
I need to create about 1000 users, with random (but normal looking names not "293dsaf81s234" but "Blue Air" (can be random dictionary words)). And I need to generate topics and … -
Replied To a Post in How to automatically create dummy content?
Exactly that! -
Created How to automatically create dummy content?
I need to create about 1000 users, with random (but normal looking names not "293dsaf81s234" but "Blue Air" (can be random dictionary words)). And I need to generate topics and … -
Began Watching How to automatically create dummy content?
I need to create about 1000 users, with random (but normal looking names not "293dsaf81s234" but "Blue Air" (can be random dictionary words)). And I need to generate topics and … -
Replied To a Post in Return array from prepared statement
> Usually if you're using PHP 5.4 and above this is the default, "PHP Version 5.6.21" But what if I cannot install anything? This isn't my server. I'm using hosting. … -
Replied To a Post in How do prepared statements even work?
And what about getting results? Also, I started new topic here https://www.daniweb.com/programming/web-development/threads/504756/return-array-from-prepared-statement Since it seems to be seperate problem. -
Replied To a Post in Return array from prepared statement
HA! I knew it I got it right, but it doesn't work: `Fatal error: Call to undefined method mysqli_stmt::get_result() in /###/###/###.php on line 47` or more descriptive: `Fatal error: Uncaught … -
Created Return array from prepared statement
$stmt = $dbconn->prepare("SELECT * FROM `members` WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); Is what I have. Database is connected etc. How can I set variable called `$dbresult` with array … -
Began Watching Return array from prepared statement
$stmt = $dbconn->prepare("SELECT * FROM `members` WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); Is what I have. Database is connected etc. How can I set variable called `$dbresult` with array … -
Replied To a Post in How do prepared statements even work?
`var_dump($stmt->fetch())` returns `true`. LOL. No s#!t Sherlock! How do I bind resulted **array** into the `bind_param` so far rifling through internet forces me to create external function. But there must … -
Replied To a Post in How do prepared statements even work?
$stmt = $dbconn->prepare("SELECT * FROM `members` WHERE username=? AND password=?"); $stmt->bind_param("ss", $username, $password); $stmt->execute(); $dbresult = $stmt->fetch(); echo $dbresult; // null $stmt->close(); Any ideas? I think I store variable, but … -
Marked Solved Status for How do prepared statements even work?
$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many … -
Replied To a Post in How do prepared statements even work?
> Read the documentation to see the data types you can define: http://php.net/manual/en/mysqli-stmt.bind-param.php Once again, I've been to manuals, this is where I got this example from :D But yea, … -
Edited How do prepared statements even work?
$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many … -
Edited How do prepared statements even work?
$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many … -
Created How do prepared statements even work?
$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many … -
Began Watching How do prepared statements even work?
$city = "Amersfoort"; if ($stmt = $mysqli->prepare("SELECT District FROM City WHERE Name=?")) { $stmt->bind_param("s", $city); $stmt->execute(); $stmt->bind_result($district); $stmt->fetch(); printf("%s is in district %s\n", $city, $district); $stmt->close(); } This brings many … -
Marked Solved Status for What's wrong with this SQL query?
`INSERT INTO 'members' ('username', 'password', 'email') VALUES ('axe', 'axe', 'weql')` - `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server … -
Replied To a Post in What's wrong with this SQL query?
THAT'S SO STUPID... QUOTE IS QUOTE.. :| Oh well. Not my rules... not my game... thanks. -
Edited What's wrong with this SQL query?
`INSERT INTO 'members' ('username', 'password', 'email') VALUES ('axe', 'axe', 'weql')` - `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server … -
Created What's wrong with this SQL query?
`INSERT INTO 'members' ('username', 'password', 'email') VALUES ('axe', 'axe', 'weql')` - `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server … -
Began Watching What's wrong with this SQL query?
`INSERT INTO 'members' ('username', 'password', 'email') VALUES ('axe', 'axe', 'weql')` - `#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server … -
Replied To a Post in Select two results at the same time
PERFECT. And the `AS` helps too (with `u.NAME AS USER_NAME`), I can command SQL to give me what I want, instead of taking time to parse it in PHP. Thank … -
Replied To a Post in Select two results at the same time
OH! I thought the first `SELECT XYZ` was about forums, not about users. And this other way around :P? How do I select specific elements of **both** sides? Let's say … -
Replied To a Post in Select two results at the same time
One more question though. `SELECT * FROM forums INNER JOIN users ON forums.lastAuthorID = users.id` requests all data from both tables. How could I request `id`, `name` only from `users` … -
Marked Solved Status for Select two results at the same time
I think this is called "foreign key" and "local key" ? I have a table `users`, these users have `rank`. It's an `int`. There is a table named `rank`, this … -
Replied To a Post in Select two results at the same time
Yes! Now it's much clearer, now let me read this 5 times and take about 1 minute to process each word, then I'll understand it ;) But thanks. As you … -
Replied To a Post in Select two results at the same time
Okay, maybe different way, something else that could help me understand this and morph into my needs. I list forums. From table `forums` The results are `Name|Description|LastAuthorID`. The results are … -
Created Select two results at the same time
I think this is called "foreign key" and "local key" ? I have a table `users`, these users have `rank`. It's an `int`. There is a table named `rank`, this … -
Began Watching Select two results at the same time
I think this is called "foreign key" and "local key" ? I have a table `users`, these users have `rank`. It's an `int`. There is a table named `rank`, this … -
Marked Solved Status for Is this SQL query correct?
I'm trying to do something, but it doesn't work out, the primary suspect is incorrect query, but I don't know whether it's correct or not. I could try running it … -
Edited Is this SQL query correct?
I'm trying to do something, but it doesn't work out, the primary suspect is incorrect query, but I don't know whether it's correct or not. I could try running it … -
Edited Is this SQL query correct?
I'm trying to do something, but it doesn't work out, the primary suspect is incorrect query, but I don't know whether it's correct or not. I could try running it … -
Created Is this SQL query correct?
I'm trying to do something, but it doesn't work out, the primary suspect is incorrect query, but I don't know whether it's correct or not. I could try running it … -
Began Watching Is this SQL query correct?
I'm trying to do something, but it doesn't work out, the primary suspect is incorrect query, but I don't know whether it's correct or not. I could try running it … -
Edited [PHP] is_int is false on integer?
Link is: `/example.php?id=1`, no space after `1`. if (isset($_GET["id"])) { $id = $_GET["id"]; echo !is_int($_GET["id"]); // yields "1" (true) !!! } Ask me whatever you need. I check to make … -
Edited [PHP] is_int is false on integer?
Link is: `/example.php?id=1`, no space after `1`. if (isset($_GET["id"])) { $id = $_GET["id"]; echo !is_int($_GET["id"]); // yields "1" (true) !!! } Ask me whatever you need. I check to make …
The End.