
53 Cal.2d 33 (1959)
THE PEOPLE, Respondent,
v.
JAMES SPATES, Appellant.
Crim. No. 6436. 
Supreme Court of California. In Bank.  
Nov. 10, 1959.
 Earl Klein, under appointment by the Supreme Court, for Appellant.
 Stanley Mosk, Attorney General, Clarence A. Linn, Assistant Attorney General, and John S. McInerny, Deputy Attorney General, for Respondent.
 McCOMB, J.
 After trial before the court without a jury, defendant appeals from a judgment of guilty of (a) robbery in the first degree and (b) attempted robbery in the first degree.
 Viewing the evidence in the light most favorable to the People, the record discloses that on the morning of February 28, 1958, defendant and Harold Langdon robbed a liquor store at 7528 South Figueroa Street, Los Angeles. The two men, each armed with pistols, separately entered the store shortly after it opened for business and threatened the proprietor with their pistols. They then tied him up and took approximately $60 from his cash register and his wallet, containing some $15. At the trial, the owner identified defendant as one of the two men who had robbed him.
 On March 8, 1958, defendant and Harold Langdon attempted to rob the dry goods store of Maurice Block at 1721 E. 103 Street, Los Angeles. Langdon entered the store first, about 8 p.m., and distracted the attention of one of the clerks by asking to see a white sweater. While the clerk was at the rear of the store showing a sweater to Langdon, defendant entered and stuck a pistol against Mr. Block's body. Mr. Block grabbed defendant's pistol and a struggle ensued, during which another customer came to Mr. Block's assistance and together they disarmed defendant, who fled from the store and managed to elude his pursuers. He was subsequently arrested, and Mr. Evans, the customer who had assisted Mr. Block, identified defendant as the robber.
 Defendant presents these questions on appeal:
 First. Did he effectively waive his right to a trial by jury?
 Yes. Defendant contends (a) that his purported waiver of a jury trial was qualified in such a manner as to make it no waiver at all and (b) that the trial court committed prejudicial error by not fully explaining to him the nature of his *35 action in waiving a jury trial. These contentions are devoid of merit.
 [1] (a) The record shows that when defendant's case was called for trial on May 27, 1958, he personally waived his right to a jury trial. The exact proceedings are as follows:
 Mr. Osterman: We will waive a jury today, your Honor.
 The Court: You represent ___
 Mr. Osterman: Langdon, your Honor.
 The Court: Which is Mr. Langdon?
 The Defendant Langdon: Here, sir.
 The Court: Mr. Langdon, do you waive your right to a trial by jury, and want to be tried by the judge without a jury?
 The Defendant Langdon: Yes, providing it stays in your court, your Honor.
 The Court: And Mr. Spates, do you likewise waive your right to a trial by jury, and want to be tried by the judge?
 Mr. Arak: Your Honor, with respect to the defendant Spates, I would ask only that it go over a short time for a continuance, since the defendant is in custody. We are ready for trial today, and have seven witnesses in court. If it may go over for a short period of time, we have no objection, and we will waive a jury provided it remains in this courtroom.
 The Court: That is all I am asking now. Do you, Mr. Spates, waive your right to be tried by a jury, and want to be tried by the judge without a jury?
 The Defendant Spates: I do, your Honor.
 The Court: And do you join, counsel?
 Mr. Arak: Join in the waiver.
 The Court: Do the People join?
 Mr. Nathanson: The People join, your Honor.
 The Court: As to both these waivers?
 Mr. Nathanson: Yes, your Honor.
 The record shows that defendant expressly and explicitly waived his right to a jury trial, and the fact that he stated the waiver was conditional on the case remaining before the judge then presiding does not result in its being ineffective. (People v. Langdon, 52 Cal.2d 425, 431-432 [341 P.2d 303]; People v. Pughsley, 74 Cal.App.2d 70 [1] et seq. [168 P.2d 27]; People v. Bastio, 55 Cal.App.2d 615, 618 [131 P.2d 614].)
 [2] (b) There is nothing in the record to support the proposition that the trial court should have explained to defendant the nature and possible consequence of his action in *36 waiving a jury trial. Defendant was represented by counsel, and he fails to show anything in the record that indicates he or his counsel was misled as to the result which might occur from his waiving a jury trial. Defendant not only was represented by counsel but, according to the record, had been before the criminal courts on at least three previous occasions. (See People v. Langdon, supra, at p. 432.)
 Second. Did the trial court commit prejudicial error in joining for trial a count of robbery and a count of attempted robbery which were charged jointly against defendant and his codefendant, Langdon, with seven additional felony counts charged solely against defendant Langdon?
 No. [3] Section 954 of the Penal Code  [fn. *] permits joinder of different offenses which do not relate to the same transaction or event where there is a common element of substantial importance in their commission.
 [4] Section 1098 of the Penal Code provides for joint trial of two or more defendants who are charged jointly with any public offense. [5] The fact that defendant Spates was charged with only two of the crimes does not render the joinder improper, since there was a joint charge as to two of the crimes and a common element of substantial importance in the commission of all of them. (People v. Chapman, 52 Cal.2d 95, 97 [1] et seq. [338 P.2d 428].) It follows that the trial court did not abuse its discretion in trying all the counts together.
 The judgment is affirmed.
 Gibson, C. J., Traynor, J., Schauer, J., Spence, J., Peters, J., and White, J., concurred.
NOTES
[fn. *]  *. Section 954 of the Penal Code reads: "An accusatory pleading may charge two or more different offenses connected together in their commission, or different statements of the same offense or two or more different offenses of the same class of crimes or offenses, under separate counts, and if two or more accusatory pleadings are filed in such cases in the same court, the court may order them to be consolidated. The prosecution is not required to elect between the different offenses or counts set forth in the accusatory pleading, but the defendant may be convicted of any number of the offenses charged, and each offense of which the defendant is convicted must be stated in the verdict or the finding of the court; provided, that the court in which a case is triable, in the interests of justice and for good cause shown, may in its discretion order that the different offenses or counts set forth in the accusatory pleading be tried separately or divided into two or more groups and each of said groups tried separately. An acquittal of one or more counts shall not be deemed an acquittal of any other count."
