Hi,
i have this page.
login: [email protected]
password: m
As you can see in IE7 the selects for the age, and radio buttons are not well organized. In FF and IE8 no problem.
Any idea?
Regards
Javi
I have a ER-Diagram (Show in http://www.4freeimagehost.com/show.php?i=f82997ca4d5d.png).
In the diagram you see 2 entities and a 1:N relataion together.
Project has 2 columns as ProjectID, ProjectName.
Employee has 3 colums as EmployeeID, EmployeeName and ProjectID.
A project has ONLY 1 project-manager and project-manager is a employee.
What columns add them?
I have no formal education in databasing or programming, but I've learned enough SQL, C++, and C# to at least get started setting up a small database on my company's server.
Using MS SQL Server 2008 R2, I have created the database and set up columns with proper data types. However, there seems to be a lot of tweaks and details that are way over my head.
Since I would like these data to be accessible to the other 7 or 8 people in my office (preferably via web browser), I'm wondering whether this is the best setup for my situation.
The other option I've read about is a LAMPP server, which I assume is the competing free option to Microsoft's Express packages. I know nothing of LAMP servers except from the articles I've read on how to set them up (and I believe I even saw a detailed tutorial somewhere).
To summarize, my question is this: Which of these (or any other) server setups would best suit my purposes, keeping in mind that I'm a true novice (but willing to learn), and would like to keep it free until I get more experience?
I have a ER-Diagram (Show in http://www.4freeimagehost.com/show.php?i=f82997ca4d5d.png).
In the diagram you see 2 entities and a 1:N relataion together.
Project has 2 columns as ProjectID, ProjectName.
Employee has 3 colums as EmployeeID, EmployeeName and ProjectID.
A project has ONLY 1 project-manager and project-manager is a employee.
What columns add them?
I'm currently using the following PHP code:
// Get all subordinates
$subords = array();
$supervisorID = $this->session->userdata('supervisor_id');
$result = $this->db->query(sprintf("SELECT * FROM users WHERE supervisor_id=%d AND id!=%d",$supervisorID, $supervisorID));
$user_list_query = 'user_id='.$supervisorID;
foreach($result->result() as $user){
$user_list_query .= ' OR user_id='.$user->id;
$subords[$user->id] = $user;
}
// Get Submissions
$submissionsResult = $this->db->query(sprintf("SELECT * FROM submissions WHERE %s", $user_list_query));
$submissions = array();
foreach($submissionsResult->result() as $submission){
$entriesResult = $this->db->query(sprintf("SELECT * FROM submittedentries WHERE timestamp=%d", $submission->timestamp));
$entries = array();
foreach($entriesResult->result() as $entries) $entries[] = $entry;
$submissions[] = array(
'user' => $subords[$submission->user_id],
'entries' => $entries
);
$entriesResult->free_result();
}
Basically I'm getting a list of users that are subordinates of a given supervisor_id (every user entry has a supervisor_id field), then grabbing entries belonging to any of those users.
I can't help but think there is a more elegant way of doing this, like SELECT FROM tablename where user->supervisor_id=2222
Is there something like this with PHP/MySQL?
Should probably learn relational databases properly sometime. :(
I have seen some questions here regarding what I want to achieve and have based what I have so far on those answer. But there is a slight misbehavior that is still irritating me.
What I have is sort of a recovery feature. Whenever you are typing text, the client sends a sync request to the server every 45 seconds. It does 2 things. First, it extends the lease the client has on the record (only one person may edit at one time) for another 60 seconds. Second, it sends the text typed so far to the server in case the server crashes, internet connection fails, etc. In that case, the next time the user enters our application, the user is notified that something has gone wrong and that some text was recovered. Think of Microsoft or OpenOffice recovery whenever they crash!
Of course, if the user leaves the page willingly, the user does not need to be notified and as a result, the recovery is deleted. I do that final request via a beforeunload event.
Everything went fine until I was asked to make a final adjustment... The same behavior you have here at stack overflow when you exit the editor... a confirm dialogue.
This works so far, BUT, the confirm dialogue is shown twice. Here is the code.
The event
if (local.sync.autosave_textelement) {
window.onbeforeunload = exitConfirm;
}
The function
function exitConfirm() {
var local = Core;
if (confirm('blub?')) {
local.sync.autosave_destroy = true;
sync(false);
return true;
} else {
return false;
}
};
Some problem irrelevant clarifications:
Core is a global Object that contains a lot of variables that are used everywhere.
sync makes an ajax request. The values are based on the values that the Core.sync object contains. The parameter determines if the call should be async (default) or sync.
Edit 1
I did try to separate both things (recovery deletion and user confirmation that is) into beforeunload and unload. The problem there was that unload is a bit too late. The user gets informed that there is a recovery even though it is scheduled to be deleted. If you refresh the page 1 second later, the dialogue disappears as the file was deleted by then.
Ok the error is showing up somewhere in this here code
if($error==false) {
$query = pg_query("INSERT INTO chatterlogins(firstName, lastName, gender, password, ageMonth, ageDay, ageYear, email, createDate) VALUES('$firstNameSignup', '$lastNameSignup', '$genderSignup', md5('$passwordSignup'), $monthSignup, $daySignup, $yearSignup, '$emailSignup', now());");
$query = pg_query("INSERT INTO chatterprofileinfo(email, lastLogin) VALUES('$email', now())";);
$_SESSION['$userNameSet'] = $email;
header('Location: signup_step2.php'.$rdruri);
}
anyone see what I did wrong??? sorry for being so unspecific but ive been staring at it for 10 mins and I can't figure it out.
I have query which needs to be dynamic on some of the columns, meaning I get a parameter and according its value I decide which column to fetch in my Where clause. I've implemented this request using "CASE" expression:
(CASE @isArrivalTime WHEN 1 THEN ArrivalTime ELSE PickedupTime END)
>= DATEADD(mi, -@TZOffsetInMins, @sTime)
AND (CASE @isArrivalTime WHEN 1 THEN ArrivalTime ELSE PickedupTime END)
< DATEADD(mi, -@TZOffsetInMins, @fTime)
If @isArrivalTime = 1 then chose ArrivalTime column else chose PickedupTime column. I have a clustered index on ArrivalTime and nonclustered index on PickedupTime.
I've noticed that when I'm using this query (with @isArrivalTime = 1), my performance is a lot worse comparing to only using ArrivalTime.
Maybe the query optimizer can't use\choose the index properly in this way?
I compared the execution plans an noticed that when I'm using the CASE 32% of the time is being wasted on the index scan, but when I didn't use the CASE(just usedArrivalTime`) only 3% were wasted on this index scan.
Anyone know the reason for this?
Could someone please point me in the right direction. My project involves a database where users enter their address and other info from my website. This database is then referenced in my android application to show the locations of these addresses in my database.
I have yet to start and just came up with this idea. My question is, what would be the best method to create a database easily modified through my website (mySQL, php, etc), and also easily referenced easily through Android and the Google Maps API? I need some ideas on the languages I will need to use to create this database and website so I can go buy the necessary books to start reading up.
Thanks so much
When SHOW WARNINGS after a EXPLAIN EXTENDED shows a
Note 1276 Field or reference 'test.foo.bar' of SELECT #2 was resolved in SELECT #1
what exactly does that mean and what impact does it have?
In my case it prevents mysql from using what seems to be a perfectly good index. But it's not about fixing that specific query (as it is an irrelevant test).
I found http://dev.mysql.com/doc/refman/5.0/en/error-messages-server.html butError: 1276 SQLSTATE: HY000 (ER_WARN_FIELD_RESOLVED)
Message: Field or reference '%s%s%s%s%s' of SELECT #%d was resolved in SELECT #%d isn't much of an explaination.
I'm running an application on windows server that connect to a SQL Server database.
Today, when I opened SQL Server Management Studio, I was surprised the database is not in the list of the databases!
I don't know what's the reason. I searched in the server files but I can't find the database and also in the recycle bin.
I put my database in C:\db\myWeb.mdf and suddenly it's been removed!
Can anyone tell me how to recover the database?
I have a table
Item(ItemName*, ItemSize*, Price, Notes)
I was making composite key of (ItemName,ItemSize) to uniquely identify item. And now after reading some answers on stackoverflow suggesting the use of UNIQUE i revised it as
Item(ItemID*, ItemName, ItemSize, Price, Notes)
But How to apply UNIQUE constraint on ItemName and ItemSize
please correct if there is something wrong in question
hi
I am trying to search for UserName and return values onto jComboBox, here is the code
public void actionPerformed(java.awt.event.ActionEvent e) {
sr = new Search(((String) jComboBoxReceiver.getSelectedItem()));
usrList = sr.searchUser();
String[] userList = new String[usrList.size()] ;
for(int i=0;i<usrList.size();i++){
userList[i]= usrList.get(i).getUserName();
}
model = new DefaultComboBoxModel(userList);
jComboBoxReceiver.setModel(model);
}
However, if i do that, it does perform correctly, however, it will go search for the first item again, which is very confusing... then i tried using key Pressed
if(e.getKeyCode()==13){
sr = new Search(((String) jComboBoxReceiver.getSelectedItem()));
usrList = sr.searchUser();
String[] userList = new String[usrList.size()] ;
for(int i=0;i<usrList.size();i++){
userList[i]= usrList.get(i).getUserName();
}
model = new DefaultComboBoxModel(userList);
jComboBoxReceiver.setModel(model);
}
And this one does not react at all ...
I have some demanding mysql queries that are needed to grap same up-to-date datasets from 5-7 mysql tables.
I am thinking of creating a table or materialized view to gather all demanding columns from other tables, so as to increase performance.
If I create that table, I may need to do extra insert / update / delete operation each time other tables updated.
if I create materialized view, I am worrying if the performance can be greatly improved. Because data from other tables are changing very frequently. Most likely, the view may need to be created first everytime before selecting it.
Any ideas? e.g. how to cache? other extra measures I can do?
Is it possible to listen to relation database update? For example, my web app want to send data update to client through Comet technology. I can have the program to poll the database periodically, but that would not be performant and scalable.
If app can hood to a "event handler" of database, then app can get notification every time given database table data is updated. This sounds more promising, but I didn't find any concrete example for it. This is listener pattern.
Does common relational database support such feature?
I'd like to convert this JSON to a data model in Cassandra, where each of the arrays is a set with no duplicates:
var data = {
"data1": {
"100": [1, 2, 3],
"200": [3, 4]
},
"data2": {
"k1", [1],
"k2", [4, 5]
}
}
I'd like to query like this: data["data1"]["100"] to retrieve the sets. Anyone know how you might model this in Cassandra? (The only thing I came up with was columns whose name was a set value and the value of the column was an empty string, but that felt wrong.)
It's not OK to serialize the sets as JSON or some other string, which would make this much easier.
Also, I should note that it's OK to split data1 and data2 into separate ColumnFamilies, it's not necessary that they're keys in the same one.
What are some useful SQL statements that should be known by all developers who may touch the Back end side of the project?
(Update: just like in algorithm, we know there are sorting problems, shuffling problems, and we know some solutions to them. This question is aiming at the same thing).
For example, ones I can think of are:
Get a list of Employees and their boss. Or one with the employee's salary greater than the boss. (Self-join)
Get a list of the most popular Classes registered by students, from the greatest number to the smallest. (Count, group by, order by)
Get a list of Classes that are not registered by any students. (Outer join and check whether the match is NULL, or by Get from Classes table, all ClassIDs which are NOT IN (a subquery to get all ClassIDs from the Registrations table))
Are there some SQL statements that should be under the sleeve of all developers that might touch back end data?
What are some useful SQL statements that should be known by all developers who may touch the Back end side of the project?
(Update: just like in algorithm, we know there are sorting problems, shuffling problems, and we know some solutions to them. This question is aiming at the same thing).
For example, ones I can think of are:
Get a list of Employees and their boss. Or one with the employee's salary greater than the boss. (Self-join)
Get a list of the most popular Classes registered by students, from the greatest number to the smallest. (Count, group by, order by)
Get a list of Classes that are not registered by any students. (Outer join and check whether the match is NULL, or by Get from Classes table, all ClassIDs which are NOT IN (a subquery to get all ClassIDs from the Registrations table))
Are there some SQL statements that should be under the sleeve of all developers that might touch back end data?
I would like to ask if there is a liveconnect equivalent for ActionScript 3. I understand that there is the ExternalInterface class inside AS3 but it only supports calling a method by name. The really cool thing about Java and LiveConnect is that you can do something like
function jsFunc(name) = {
this.name = name;
this.talk = function(){
alert('hello world my name is ' + this.name);
}
}
javaapplet.function(new jsFunc("bob"));
The above approaches pseudo code since I never tested it but I've seen it in action. In AS3, while I am able to pass in an instance of JavaScript "object" into AS, it is often converted into an ActionScript Object instance which does away with all the functions as far as I'm aware.
I saw an implementation of JSInterface but I don't think it does specifically that. Is there any way to make OO like javascript work with ActionScript 3?
I wondered whether you guys could help me - I have a big problem with overcoming inertia, i.e. how to just get started on a project/work when you simply feel the inertia of not being in the right 'zone' to do work such that
it really becomes pretty damn tough to actually get on with what you want to do.
Forgive me quoting my blog post where I try to express the problem as best I can:-
The problem is that it feels so damned difficult to exert the force required to shift from one mode to another, so much so that you find it almost inconceivable to do so at the time. You need to force yourself somehow, or at least find some sort of hack to trick yourself into it.
Do you guys have any ideas/hacks as to how to overcome this?
Thanks in advance, and hopefully the community feel this question is valid for stack overflow (I have set it community wiki due to its fairly subjective nature.)
I'm trying to create this trigger and getting the following compiler errors:
create or replace
TRIGGER RESTAR_PLAZAS
AFTER INSERT ON PLAN_VUELO
BEGIN
SELECT F.NRO_VUELO, M.CAPACIDAD, M.CAPACIDAD - COALESCE((
SELECT count(*) FROM PLAN_VUELO P
WHERE P.NRO_VUELO = F.NRO_VUELO
), 0) as PLAZAS_DISPONIBLES
FROM VUELO F
INNER JOIN MODELO M ON M.ID = F.CODIGO_AVION;
END RESTAR_PLAZAS;
Error(2,7): PL/SQL: SQL Statement ignored
Error(8,5): PL/SQL: ORA-00933: SQL command not properly ended
Error(8,27): PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: begin case declare end exception exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe
Error(2,1): PLS-00428: an INTO clause is expected in this SELECT statement
What's wrong with this trigger?
I have to process like 10-100 millions records.
I have to give the data to the client when it's finish. The data is givent as SQL requests to execute in the database. He have a powerful server with MySQL, I think it will be fast enough.
The issue is my computer is not as powerful as his server, so I would like to use an other SQL server who is compatible (I export his database and import it in my computer) with MySQL but more powerful.
What should I use? Or am I doomed to use MySQL?
my question is:
i have a member that can pay in 3 different way
credit card
check
transfer from bank account
how design the table that contain the history of payment.
the fields of every way is different .
if i save all in one table , i have lot of blank field ?
what the right way to deal it ?