
163 Cal.App.2d 436 (1958)
THE PEOPLE, Respondent,
v.
JOHN D. IVY, Appellant.
Crim. No. 6137. 
California Court of Appeals. Second Dist., Div. Three.  
Sept. 11, 1958.
 Fredric A. Spindell, under appointment by the District Court of Appeal, for Appellant.
 Edmund G. Brown, Attorney General, and William E. James, Deputy Attorney General, for Respondent.
 VALLEE, J.
 In a nonjury trial defendant was convicted of two counts of selling heroin. (Health & Saf. Code,  11500.) He appeals from the judgment.
 At the time of his arraignment defendant pleaded not guilty to the two counts charged in the information. Thereafter, defendant, with counsel present, pleaded guilty to count I.  [fn. 1]*437 At that time at defendant's request further proceedings as to count I and disposition of count II were continued. Later defendant, with counsel present, withdrew the plea of guilty to count I and pleaded not guilty thereto. The trial was had, and defendant was found guilty as charged in both counts.
 Defendant testified in his own behalf and denied selling heroin, as charged in count I. In the course of his direct examination the following occurred: "The Court: Now, on June 10th you appeared before me? The Defendant: Yes, sir, I did. The Court: At that time I asked you whether or not you were guilty of Count II which charges the sale of this particular__________ Mr. Chandler: Pardon me, I believe that was Count I. The Court: Count I? The Witness: Yes, sir. The Court: You told me you were guilty of that charge? The Witness: Yes, sir. The Court: Why did you tell me you were guilty of the charge? The Witness: Because the counselor I had at that time, he advised me if I did, it would be more lenient punishment put on me for one count than two. The Court: Do you remember my asking you if anybody promised you anything? The Witness: Yes, sir. The Court: You told me no one promised you anything? The Witness: Yes, sir, I did say that. The Court: Why did you say that if it wasn't true? The Witness: Because it was due to my inexperience and I was somewhat excited. He didn't promise me anything. He said it would be considered and I would have a chance of more lenient punishment if I did plead guilty to one count rather than be found guilty of two; and not having been in Superior Court before, why, I counted on his advice and accepted his advice, being a lawyer, that he would give me the best advice." Defendant was then examined further by his counsel. In the course of this examination the following occurred: "The Court: You stated to the Court awhile ago that the reason you pleaded guilty to the one count was because your attorney told you it would be easier for you if you had one count rather than two. But if you were not guilty of any of the counts why did you agree to enter a plea of guilty to one? The Witness: Judge, your Honor, he was telling me that I was charged with this narcotics, and that there was this public sentiment against it, and the average citizen would look down on it and consider me guilty without *438 any explanation because of the word narcotic. People are prejudiced against the subject. The Court: You mean to tell me he told you the Court would find you guilty simply because of public sentiment; the Court would find you guilty regardless of what the truth was? The Witness: More or less, yes, sir, that is what he meant, that my chances were very slim because it involved narcotics; and there was being so many arrests, and people were going to prison for it, and my chances would be very slim, according to the transcript we had read over together."
 [1] Defendant's only point is that the court committed prejudicial error in the examination with respect to his plea of guilty to count I. People v. Ryan, 82 Cal. 617 [23 P. 121], held that after a plea of guilty has been withdrawn by permission of the court, and the plea of not guilty substituted, as provided by section 1018 of the Penal Code, the plea of guilty becomes functus officio, and cannot be proved on the trial as an admission or confession of the defendant; that to receive the evidence would defeat the privilege granted by section 1018 of the Penal Code.  [fn. 2] People v. Boyd, 67 Cal.App. 292 [227 P. 783], was a prosecution for obtaining money by false pretenses. The defendant's offer to plead guilty to one offense charged if the court would continue the case was admitted in evidence over objection. The District Court of Appeal held that the trial court erred in overruling the objection but that the error was not prejudicial. In denying a hearing the Supreme Court said (p. 302):
 "We deem it proper, however, to say that we disagree with that portion of the opinion which holds that it was error for the trial court to overrule the objection of the defendant to the admission in evidence of the offer on his part to plead guilty to one offense charged in the information. The action of the defendant in that regard was an admission on his part of the truth of the charge that he obtained money under false pretenses, which, with the other evidence, was properly left to the consideration of the jury. (People v. Jacobs, 165 App.Div. 721 [151 N.Y. Supp. 522].) Such an admission was not, of course, conclusive evidence against the defendant. It was competent evidence merely, its weight and sufficiency being proper subjects for consideration by the jury. (State v. Bringgold, *439 40 Wash. 12, 17 [82 P. 132].) When the fact was established that the admission had been made by the accused, the admission was not before the jury as testimony by him establishing the truth of all or any part of the allegations of the information, but the fact that he had made it was before them, and was relevant as being inconsistent with his claim to the jury that he did not obtain any money under false pretenses from the complaining witnesses and was not guilty. (State v. Carta, 90 Conn. 79 [96 A. 411].) The defendant's own admission, voluntarily made, was clearly competent evidence against him. That he made the admission in court can detract nothing from its relevancy or its competency. (Ehrlick v. Commonwealth, 125 Ky. 742 [128 Am.St.Rep. 269, 102 S.W. 289]; People v. Gould, 70 Mich. 240 [14 Am.St.Rep. 493, 38 N.W. 232].)"
 "The opinion of this court in People v. Ryan, 82 Cal. 617 [23 P. 121], in which it was held to be error to introduce in evidence a plea of guilty after it had been withdrawn by permission of the court and a plea of not guilty substituted, seems to be out of harmony with what we believe to be the correct and the better rule. It should be noted, however, that the court was there dealing with a case in which there could have been no conviction without the plea of guilty being considered as a 'confession,' and the conviction was accordingly reversed."
 The court in People v. Sanderson, 129 Cal.App. 531 [18 P.2d 982], said (p. 532): "Over the objection of appellant's counsel that it was incompetent, irrelevant and immaterial a witness was asked if he heard the defendant make a statement at the preliminary examination with reference to pleading guilty, to which the witness answered, 'I did.' The asking of this question was also cited as misconduct. Thereafter the witness stated that defendant stated at the time in question that 'he wished to waive his entire preliminary and plead guilty in the superior court.' Such evidence would seem very competent to be considered, with the other evidence, on the question whether or not appellant committed the burglary. The statement seemed to be voluntarily made by defendant himself, and it had a direct bearing on the issue raised by the plea of not guilty." (Also see People v. Snell, 96 Cal.App. 657, 662-663 [274 P. 560].)
 The effect of the ruling of the Supreme Court in People v. Boyd, supra, 67 Cal.App. 292, was to disapprove People v. Ryan, supra, 82 Cal. 617, insofar as the latter case held that *440 a plea of guilty which has been withdrawn is inadmissible. In Boyd the evidence held admissible by the Supreme Court was an offer on the defendant's part to plead guilty to one offense charged in the information. At bar the evidence was a plea of guilty to one of the offenses charged. We think it follows that if an offer to plead is admissible in evidence, a plea of guilty is likewise admissible. Defendant's plea of guilty to count I was an admission on his part of the truth of the charge. The admission was not conclusive evidence against him. It, together with his explanation, was competent evidence, its weight and sufficiency being for the consideration of the trier of fact. From the record, the plea of guilty appears to have been made voluntarily and it had a direct bearing on the issue raised by defendant's plea of not guilty. As said by the Supreme Court in Boyd, the fact that defendant made the admission in court does not affect its admissibility.
 Affirmed.
 Shinn, P. J., and Wood (Parker), J., concurred.
NOTES
[fn. 1]  1. The following took place at the time defendant pleaded guilty to count I: "Mr. Klynn [attorney for defendant]: Your Honor, this is more or less of an associate case to the prior case of Mr. Thomas, and it is also the defendant's desire in this case to enter a plea as to count 1. Is that correct, Mr. Ivy? The Defendant: Yes. The Court: Mr. Ivy, you are charged with a violation of section 11,500 Health and Safety Code, selling heroin. Now, do I understand you wish to enter a plea of guilty to that charge? The Defendant: Yes, sir, your Honor. The Court: You do that because you are in fact guilty of it? The Defendant: Yes, your Honor. The Court: Has anyone promised you anything if you entered a plea of guilty? The Defendant: No, your Honor. The Court: You do this freely and voluntarily? The Defendant: Yes, your Honor. The Court: All right. Mr. Woodmansee: John D. Ivy, under information number 189579, how do you now plead under count 1 thereof to violation of section 11,500 Health and Safety Code, a felony, guilty or not guilty? The Defendant: Guilty."
[fn. 2]  2. Penal Code, section 1018, in pertinent part reads: "On application of the defendant at any time before judgment the court may, and in case of a defendant who appeared without counsel at the time of the plea to court must, for good cause shown, permit the plea of guilty to be withdrawn and a plea of not guilty substituted."
