Member Avatar
Ange_2 Joined the Community
Member Avatar
Reverend Jim 2,058 Replied To a Post in SQL question
Topic by thomas_43 in Programming
Since `Date` cannot be both `Nov` and `Oct` your Case will always return 0. Also, `Date` is possibly a reserved word and should be avoided as a field name. It's been a few years since I've had a SQL DB installed so I am a bit rusty (and I can't … Reply by Reverend Jim
Member Avatar
Topic by random_1 in Web Development
I suggest to you use `filter_input()` method instead of `$_GET['page']` and set min, max, default values:

<?php
$perPage = 6;

$stmt = $conn->prepare("select count(*) from tbl");
$stmt->execute();
$productCount = $stmt->fetchColumn();
$totalPages = ceil($productCount/$perPage)-1;

$options = array('options'=>
array('min'=>0,'max'=>$totalPages,'default'=>0)
);
$page = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT, $options);
?>

Use 0 for first page … Reply by AndrisP
Member Avatar
random_1 15 Replied To a Post in Select from database on submit
Topic by random_1 in Web Development
php
Well, it was a missing apostrophe(?) i that what you call this ' ? but now its just blank. Reply by random_1
Member Avatar
Hi, so this is the most basic thing ever but i am having trouble with it. idk if its because of the code or it just can't be done or idk something. I am trying to retrieve from database by clicking on a [input type submit] button but I am … Topic by random_1 in Web Development
php
Member Avatar
Hi, so this is the most basic thing ever but i am having trouble with it. idk if its because of the code or it just can't be done or idk something. I am trying to retrieve from database by clicking on a [input type submit] button but I am … Topic by random_1 in Web Development
php
Member Avatar
Jeromes Joined the Community
Member Avatar
Hi, so this is the most basic thing ever but i am having trouble with it. idk if its because of the code or it just can't be done or idk something. I am trying to retrieve from database by clicking on a [input type submit] button but I am … Topic by random_1 in Web Development
php
Member Avatar
Acak Joined the Community
Member Avatar
rproffitt 1,064 Replied To a Post in I don't know to whom appeal to
Topic by KocsisNora in Microsoft Windows
Time to put it on Google Docs.

But first you are likely to get replies by SCUM that SPAM document repair tools. Hey, if you fall for that, your wallet.

We don't need to open the doc in OpenNote as noted at http://smallbusiness.chron.com/save-onenote-google-docs-53952.html but the second half is all I … Reply by rproffitt
Member Avatar
rproffitt 1,064 Replied To a Post in Find the smallest n such that n^3>1000
Topic by John_165 in Software Development
Odd, when I removed the EQUAL sign I got 9.

To address concerns about the variable i, I spiffed up the code to look like this.


public class Chapter4 {
static int n = 0;
public static void main(String[] args) {
for (n = 1; Math.pow(n, 3) <= 1000; n++) … Reply by rproffitt
Member Avatar
rproffitt 1,064 Replied To a Post in Windows 10 hard drive C is labelled as E
Topic by ggeoff in Microsoft Windows
Let's number a few problems.

1. I can't find the "error message" you are asking about. So you've left me without that or I've just missed where you shared that.

2. If there is an issue with the inboxrepair tool, you take it back to the author. There are common … Reply by rproffitt
Member Avatar
Topic by ggeoff in Microsoft Windows
Let me restate the issue. There is nothing wrong with the RAID it is healthy. The issue is that it is labelled as drive letter E. I have tried to change the drive letter to C but I get "The Parameter is incorrect".

The Inboxrepair tool cannot function as it … Reply by ggeoff
Member Avatar
Hello, I have a products page which lists the pics of the products. I added pagination with bootstrap classes. I have 10 products in my database. I want to limit per page to display only 6 so then the second page should display 4. The issue im facing now is … Topic by random_1 in Web Development
Member Avatar
gathagu Joined the Community
Member Avatar
Hello, I have a products page which lists the pics of the products. I added pagination with bootstrap classes. I have 10 products in my database. I want to limit per page to display only 6 so then the second page should display 4. The issue im facing now is … Topic by random_1 in Web Development
Member Avatar
Hamdullah Joined the Community
Member Avatar
Jones_1 Joined the Community
Member Avatar
James_89 Joined the Community
Member Avatar
Lady and gentlemen I want to ask you. I have the document in OneNote 2007, but there is a problem, I can't open it cause of - This file does not appear to be a OneNote file. This message has appeared today at opening it. Yesterday the document was valid. Topic by KocsisNora in Microsoft Windows
Member Avatar
KocsisNora Joined the Community
Member Avatar
sudi_1 Joined the Community
Member Avatar
Oshiee Joined the Community
Member Avatar
thomas_43 Created SQL question
Hi,

I have a problem where I need to search on data set with 5 fields.

Field 1 - Account number
Field 2 - Date
Field 3 - Person1
Field 4 - Person2
Field 5 - Person3

The data sat contains two months of data (November and October).

I need … Topic by thomas_43 in Programming
Member Avatar
John_165 14 Marked Solved Status for Find the smallest n such that n^3>1000
Use a **for** loop to find the smallest integer n such that n^3 is greater than 1000

So I came out with below code



public class Chapter4 {
static int n = 0;
public static void main(String[] args) {
for (int i = 1; Math.pow(i, 3) <= 1000; i++) { … Topic by John_165 in Software Development
Member Avatar
John_165 14 Replied To a Post in Find the smallest n such that n^3>1000
Topic by John_165 in Software Development

>
If you used 10000 instead of 1000 you would get 21.

Yes, you're right ! Just realize I wrote 10000 instead of 1000.


>
10 to the 3rd power EQUALS 1000. It is not GREATER THAN 1000.

I also removed the EQUALS sign so can get value GREATER THAN … Reply by John_165
Member Avatar
random_1 15 Marked Solved Status for Inserting password with hash
Hello, I am trying to insert a registration form with password using `password_hash()` but I am not sure what is wrong with whatever i am doing because the password doesn't get inserted into the database although all the other values do and no errors.

database :
password | varchar(255)

php: … Topic by random_1 in Web Development
Member Avatar
random_1 15 Replied To a Post in Inserting password with hash
Topic by random_1 in Web Development
My own rookie mistake. the coding is fine. sorry. Reply by random_1
Member Avatar
random_1 15 Marked Solved Status for How to edit css of bootstrap code
Hello, (i don't really know any specific bootstrap forum which might be better for asking about it but i like daniweb anyway), I am trying to modify a bootstrap snippet to what i need but I am having a little trouble. If you look at the attached images, what i … Topic by random_1 in Web Development
Member Avatar
random_1 15 Marked Solved Status for Logging out and destroying a session
Hi, I have a logout script that works just fine but I don't think its actually killing the session(?). so i have index.php, login.php, home.php, session.php, and logout.php. When i logout from home.php I am redirected to index.php, which is great. But when i manually enter the home.php url i … Topic by random_1 in Web Development