
samona
Members-
Posts
232 -
Joined
-
Last visited
Never
Everything posted by samona
-
Will PCI Express x16 work ona PCI Express x8 slot?
samona replied to samona's topic in Miscellaneous
The problem is that my server has 8x PCI Express, but my video card is 16x. So I'm not sure if video cards are made to be backward compatible? -
I have a server with x8 PCI Express slot. Would a video card that is x16 fit into the x8 PCI server slot?
-
Does anyone know of an example checklist form?
-
I am reading the information from a database, so for example: In the table named Tasks I have the following records: Finished Homework | 5:00 PM Done Shopping | 6:00 PM Now in the form, since I have already completed these tasks, I don't want to have the option of selecting them. My code is <form action="checklist.php" method="post"> <input type="checkbox" name="task[1]" value="1">Finished Homework <input type="checkbox" name="task[2]" value="2">Done Shopping <input type="checkbox" name="task[3]" value="3">Watching TV <input type="submit" name="submit" /> Now, since the records Finished Homework and Done Shopping are already in the database, I don't want to give the user the option of checking those boxes again. So I thought maybe if I could keep them from being displayed that way they can't add a duplicate record for the same task. Am I even going about this the right way? Any help will be appreciated.
-
I think what I need to do is put a php conditional saying that if there is a value for this data field, then dont print that field. Does that make sense?
-
The form I'm looking to create is a form consisting of tasks. For example, If the user has already completed task #1, then when he opens the form again, it should not display task one again. Instead it will display task 2-n.
-
Is there a way to show only the part of a form which has not yet been completed using php? For example, I have a form that is linked to a database, however, the fields of the form which have already been submitted successfully should not appear on the form again the next time the user tries to fill it out.
-
Yeah, because we are using a conditional which evaluates whether it is NULL (no value)
-
It worked perfectly. Thanks!
-
I'm trying to do a left join to get tasks that were not completed. However, the query gives me tasks that were completed as well as tasks that were not completed. How, do I get only tasks that have a NULL Value. My code is below: Select Task.Description, task_user.created From Task LEFT JOIN task_user ON Task.Task_ID = task_user.task_ID AND DATE_FORMAT(task_user.created, '%Y %m %d') = DATE_FORMAT(CURDATE(), '%Y %m %d')
-
OK, to do yesterday you would write the following query Select * From task_user WHERE DATE_FORMAT(created, '%Y %m %d') = DATE_FORMAT(CURDATE() - INTERVAL 1 DAY, '%Y %m %d') Again, I'm new at this stuff so I don't know how optimized this code is. If anyone knows better please post. For the rest of us newbies this works. Thanks to fenway for helping me with the idea.
-
I don't know how great this code is but it works: Select * From task_user WHERE DATE_FORMAT(created, '%Y %m %d') = DATE_FORMAT(CURDATE(), '%Y %m %d') That worked to display tasks that were created today. I hope that's useful to someone. If anyone knows any better way to do it, please post it. Thanks!
-
I'm getting the following error: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '( created ) = CURDATE( ) LIMIT 0, 30' at line 1 I was reading the DATE() function in the php manual and it doesn't show a way to convernet NOW() to DATE(), so am I correct to say that MySQL is not capable of performing this conversion?
-
Hi, I have an ongoing assignment that I'm programming. Thanks for all previous help. Right now I have stored some records in a database using NOW() as the value for the created field. I am trying to display only records that have been created today and my query is producing incorrect results. For example, $sql = "Select name, task From 'table' where created= CURDATE()"; It's not displaying anything. I noticed that the created field has (year-month-day hr-min-sec), so I'm not sure how I would query for what was created in (year-month-day) and NOT hr-min-sec. Any help will be appreciated.
-
ok i got it, thx
-
I checked that code and it works. However, I don't understand how it works. How would $sql be able to submit all those tasks in the database with only one command? Does it have to do with some special property arrays (checkbox) have?
-
at the end of this loop would i do mysql_query($sql), but isn't that running just one query since sql will continue to be written over through each time in the loop?
-
You're a really smart guy and I can see that. But you should consider teaching one day cuz you're really good at explaining stuff. Me I'm new to PHP and mysql. I'm trying to be as best as I can be, but I know it takes a lot of time. Maybe one day, I can help you out and answer posts too. Thanks for everything, and I'm sure I'll have more questions in the future.
-
Can I ask a personal question? Are you a Professor ?
-
Thanks roopurt, I will try it when I get home. I don't know how I can thank you and the website for creating this helpful community. Would a donation to phpfreaks help?
-
Yes, there are three tables. 1. A task table with taskID and task_description. 2. A user table with user_name and userID. 3. A user_task table with taskID, userID, and Date. task 'finished_homework' has a taskID of 1. task 'cleaned_my_room' has a taskID of 2. user table has user 'samona' with a userID of 1. user table has a user 'michael' with a userID of 2. So, should the form look like the following: <input type="radio" name="1" value="yes"/>Yes <input type="radio" name="1" value="no"/>No
-
I'm trying to put it in the form like: <input type="radio" name="finished_homework" value="yes"/>Yes <input type="radio" name="finished_homework" value="no"/>No but when i do the sql statement how will it know that the task "finished_homework" is task number 1? I can't figure out how I would write that sql statement. If i use the insert, then it will just insert "yes" or "no". And when I do select * where task_id="4" it doesn't print out anything.
-
Ok, theres a problem. The sql statements now only provide for a form with one task at a time. But it is possible that the user has completed multiple tasks at the same time. So how would I insert all the tasks selected in one form into the database when the user clicks submit?
-
Wow, thanks so much. I have learned so much just reading what you guys are writing. Once I get home I will reread everything and spend more time thinking about it. You guys are awesome and thank you so much. I love this place!!!
-
Thanks a lot for that information, I finally understood what you mean. So, say I wanted to show all the tasks that were done and all the tasks that were not done on a particular day, would I be able to query that from this database using those 3 tables and display them on one page?