
167 Cal.App.2d 534 (1959)
ARTHUR MAXSON SMITH, Appellant,
v.
THE MUNICIPAL COURT OF GLENDALE JUDICIAL DISTRICT, Respondent.
Civ. No. 23349. 
California Court of Appeals. Second Dist., Div. One.  
Feb. 3, 1959.
 Robert A. Keller for Appellant.
 Harold W. Kennedy, County Counsel (Los Angeles), Donald K. Byrne and Iver E. Skjeie, Deputy County Counsel, for Respondent.
 NOURSE, J. pro tem.  [fn. *]
 By his petition in this action plaintiff sought from the Superior Court of Los Angeles County writs of prohibition and mandate against the Municipal Court of Glendale Judicial District, County of Los Angeles. Demurrer to his petition having been sustained with leave to amend and petitioner having failed to amend, judgment of dismissal was entered and from this judgment petitioner appeals.
 Petitioner seeks to prohibit the respondent court from proceeding to try him on a complaint charging him with the violation of section 476, subd. (c) of the Vehicle Code and seeks writ of mandate to compel the respondent court to enter its order transferring the action to the Municipal Court of Los Angeles (the county seat). Petitioner is entitled to a writ of prohibition if the respondent court in seeking to try him is acting in excess of its jurisdiction even though it may have jurisdiction over petitioner's person and jurisdiction of cases involving the misdemeanor charged. (Abelleira v. District Court of Appeal, 17 Cal.2d 280, 285-291 [109 P.2d 942, 132 A.L.R. 715]; Caminetti v. Superior Court, 16 Cal.2d 838, 848 [108 P.2d 911]; State v. Superior Court, 14 Cal.App.2d 718 [58 P.2d 1322]; Shell Oil Co. v. Superior Court, 2 Cal.App.2d 348 [37 P.2d 1078]; Carter v. Superior Court, 176 Cal. 752 [169 P. 667].) He is entitled to the writ of mandate if the respondent court has abused its discretion and he has no speedy and adequate remedy at law. (Caminetti v. Superior Court, supra; Dowell v. Superior Court, 47 Cal.2d 483 [304 P.2d 1009]; Marr v. Superior Court, 30 Cal.App.2d 275, 279 [86 P.2d 141]; Simmons v. Superior Court, 96 Cal.App.2d 119, 132 [214 P.2d 844, 19 A.L.R.2d 288].)
 Whether the respondent court would be acting in excess of its jurisdiction should it proceed to try him and whether it has abused its discretion in refusing a transfer of the action to the municipal court of the county seat, is dependent upon the construction placed upon section 739 of the Vehicle Code and sections 1462 and 1462.2 of the Penal Code.
 The facts as alleged by the petition and which are by the *536 demurrer thereto admitted to be true are in substance as follows: On June 23, 1957, petitioner was placed under arrest in the city of Glendale by a police officer of that city. At the time of the arrest the officer prepared a citation charging petitioner with the violation of section 476, subd. (c) 1 of the Vehicle Code for allegedly having made a right turn against a red light in violation of that section. Petitioner then demanded that the arresting officer specify in the citation as the place for him to appear the municipal court at the county seat, namely, Los Angeles. This the arresting officer refused to do and specified in the citation the respondent court as the place at which petitioner would, by signing the citation, promise to appear. Petitioner refused to sign this citation and was thereupon taken into custody by the arresting officer and removed to the Glendale police station where he was booked, fingerprinted, photographed and released on bail.
 On June 24, 1957, petitioner appeared in the respondent court, objected to the jurisdiction of that court and demanded that the cause be transferred to the Municipal Court of Los Angeles Judicial District. His motion was denied and he was thereupon arraigned upon a criminal complaint charging the violation of the section of the Vehicle Code above mentioned and July 16th was set as the date for plea. On that date petitioner appeared by his attorney and objected to the jurisdiction of the respondent court and filed a written motion to transfer the cause to the county seat and to stay proceedings. On July 22d this motion was denied and the cause continued to September 3, 1957, for the purpose of plea, the petitioner having waived the time to plead. Thereupon petitioner filed his petition in the superior court.
 Section 739 of the Vehicle Code, insofar as is pertinent here, reads as follows:
 "Whenever a person is arrested for any violation of this code, not declared herein to be a felony, ... and such person is not immediately taken before a magistrate as hereinbefore required or permitted, the arresting officer shall prepare in triplicate a written notice to appear in court or before a person authorized to receive a deposit of bail, containing ... the time and place when and where such person shall appear ..."
 "(c) The place specified in said notice to appear shall be either:"
 "(1) Before a magistrate within the county in which the *537 offense charged is alleged to have been committed and who has jurisdiction of the offense and is nearest or most accessible with reference to the place where said arrest is made; or"
 "(2) Upon demand of the person arrested, before a municipal court judge ... at the county seat of the county in which such offense is alleged to have been committed or before a magistrate in the judicial district in which the offense is alleged to have been committed." (Emphasis added.)
 Section 1462 of the Penal Code confers jurisdiction on each municipal court within a county of all misdemeanors committed within the county in which such municipal court is established with certain exceptions which are not pertinent here.
 Section 1462.2 of the Penal Code so far as is pertinent here reads as follows:
 "Except as otherwise provided in the Vehicle Code, the proper court for the trial of criminal cases amounting to misdemeanor shall be determined as follows: If there is a municipal court ... having jurisdiction of the subject matter of the case, established in the district within which the offense charged was committed, such court is the proper court for the trial of the case; ... [emphasis added.]"
 "If an action or proceeding is commenced in a court having jurisdiction of the subject matter thereof other than the court herein designated as the proper court for the trial, the action may, notwithstanding, be tried in the court where commenced, unless the defendant, at the time he pleads, requests an order transferring the action or proceeding to the proper court. If after such request it appears that the action or proceeding was not commenced in the proper court, the court shall order the action or proceeding transferred to the proper court." (Emphasis added.)
 It is petitioner's contention that under section 739 of the Vehicle Code he had the right to select the court before which he would be obligated to appear and having made his demand that he be cited to appear at the county seat, the municipal court there was the proper court for the trial of the action and that the respondent court therefore acted in excess of its jurisdiction in proceeding to try him and abused its discretion in refusing to transfer the action to the municipal court at the county seat.
 [1a] We are of the opinion that it was the intent of the Legislature to permit the person arrested upon a charge such as that involved here to designate the place at which he should *538 appear and be tried. The section requires the officer to specify in the notice or citation the place at which the person shall appear and provides that this place shall be either before the nearest or most accessible magistrate within the county with reference to the place where the arrest is made or upon demand of the person arrested, before a magistrate in the county seat or a magistrate in the judicial district in which the offense was alleged to have been committed. It is respondent's contention that by the use of the word "either" in paragraph (c) of section 739 of the Vehicle Code the Legislature evidenced its intent to give the arresting officer the right to specify in the citation the place at which the arrestee should appear. We do not so read the statute. It is apparent that while the statute requires the officer to specify in the notice one or the other of the two places for the appearance of the arrestee, it does not leave to his discretion which of the two places shall be named. If no demand is made by the arrestee the officer must specify the place of appearance as before a magistrate within the county which has jurisdiction of the offense and who is nearest and most accessible with reference to the place where the arrest is made. But if a demand therefor is made by the arrestee the officer must specify as the place of appearance a municipal court within the judicial district at the county seat or at the demand of the arrestee, before a magistrate in the judicial district in which the offense is alleged to have been committed.
 Inasmuch as paragraph (c) (2) of the section provides for a demand on the part of the person arrested, we must assume that the Legislature intended the word "demand" to have its ordinary meaning and the import which that meaning gives to the statute. "Demand" is defined as: "An asking with authority, claiming or challenging as due." The clear import of the statute is therefore to give the right to the arrested person to specify the place of his appearance and trial. If he has a right to demand that as something due him, that right cannot be denied him at the discretion of the arresting officer.
 In interpreting this statute we must presume that the Legislature intended that all its provisions have meaning and perform a useful function. (Clements v. T. R. Bechtel Co., 43 Cal.2d 227, 233 [273 P.2d 5]; Dempsey v. Market Street Ry. Co., 23 Cal.2d 110, 113 [142 P.2d 929]; Weber v. County of Santa Barbara, 15 Cal.2d 82, 86 [98 P.2d 492].) Certainly it was the intent of the Legislature in enacting paragraph (c) (2) of section 739 that that section should have some *539 efficacy, but if the construction placed upon it by the trial court and which is contended for by the respondent is placed upon it, the paragraph is purely surplusage, for if the arresting officer may disregard the demand of the arrestee the right to make the demand becomes meaningless. Had the Legislature intended that the officer might at his discretion fix the place at which the arrestee should appear, it would have been a simple matter to eliminate paragraphs (1) and (2) of paragraph (c) and change paragraph (c) to read: "The place specified in the notice shall be before any magistrate within the county in which the offense charged is alleged to have been committed and who has jurisdiction of the offense," thus leaving it to the arresting officer to give heed to or ignore the demand of the arrested person that he be cited to appear at the county seat or before a judge of the municipal court in the judicial district in which the offense was committed. It is to be noted that when the Legislature intended that the officer might exercise his discretion in the matter of either taking the arrestee into custody or issuing him a citation it gave this discretion to the officer in express terms. (See Veh. Code,  737 and 737.5.)
 The construction which we have placed upon section 739 is the construction placed upon that section by the attorney general of this state in two opinions rendered to executive officers charged with the enforcement of the provisions of the Vehicle Code. (See Opinions of the Attorney General, NS 2582 and NS 3076.) Both of these opinions were rendered by the attorney general in 1940. So far as we are advised the construction placed by the attorney general upon the section has not, in the 18 years that have passed since he rendered his opinion, been challenged. [2] While the opinions of the attorney general are not controlling as to the meaning of the statute the fact that his opinions have not been challenged and that he is the officer charged by law with advising the officers charged with the enforcement of the law as to the meaning of it, entitle his opinions to great weight. (Carter v. Commission on Qualifications, 14 Cal.2d 179 [93 P.2d 140]; Mudd v. McColgan, 30 Cal.2d 463 at 470 [183 P.2d 10]; Corey v. Knight, 150 Cal.App.2d 671 at 678 [310 P.2d 673].) It is worthy of note that since the attorney general rendered the opinions above mentioned the Legislature has twice amended section 739 but has not made any change in the wording of those portions of the section which were construed by the attorney general in his opinions. *540
 [1b] That section 739 of the Vehicle Code provides for a place of trial as well as a place for appearance of persons who have been cited and promised to appear on charges of violation of the provisions of the Vehicle Code other than those specified in sections 736-737 and grants jurisdiction to the judges of the municipal court at the county seat to try such cases seems self-evident. In the first place the provisions of 1462.2 of the Penal Code that "[e]xcept as otherwise provided in the Vehicle Code, the proper court for the trial of criminal cases amounting to misdemeanor shall be determined as follows: "clearly indicates the intent of the Legislature that the provisions of chapters 1 and 2, division 12 of the Vehicle Code should be construed as designating as the proper courts for the trial of cases involving the misdemeanors therein specified the courts before whom the person arrested for such misdemeanors might be cited. In the second place unless section 739 as well as sections 736, 737 and 737.5 of the Vehicle Code be construed as giving the right to municipal courts other than the municipal court of the judicial district in which the offense is committed, to try offenses for which a person may be cited before them under those provisions of the Vehicle Code, those courts would not have the right over objection to try a person appearing before them upon a citation. This is true because under the provisions of section 1462.2 of the Penal Code, other than that part thereof which excepts from its provisions the provisions of the Vehicle Code, it is only the municipal court of the judicial district in which the offense is committed which is the proper court for the trial of the cause.
 We hold therefore, that the arresting officer was upon the demand of petitioner required to specify the municipal court at the county seat as the place where petitioner should appear and that the Municipal Court of the Los Angeles Judicial District was the proper court for the trial of the cause.
 In arriving at this conclusion we have not overlooked the contention of the respondent that inasmuch as petitioner was taken into custody and did not sign a promise to appear that the provisions of section 739 cannot be applied. We find no merit in this contention, for to uphold it would permit the arresting officer to violate his duty to respect the demand of the person arrested as to the place of appearance and by his violation defeat the rights of the arrestee under the section. The arrested person, unless he resists arrest, has no means of asserting his rights under said section 739 except to do as petitioner *541 did here, immediately demand that the hearing on the charge against him be transferred to the county seat in accordance with his demand to the arresting officer.
 The Municipal Court of the Los Angeles Judicial District being the proper place for the trial of the action against petitioner, section 1462.2 of the Penal Code made it the duty of the respondent court to transfer the case to the Municipal Court of the Los Angeles Judicial District. So far as pertinent to this question section 1462.2 of the Penal Code reads: "If after such request [for transfer] it appears that the action or proceeding was not commenced in the proper court, the court shall order the action or proceeding transferred to the proper court." (Emphasis added.) There being no dispute as to the facts the court was without discretion to deny the motion to transfer and petitioner was entitled to the transfer as a matter of right. The order of the court denying the motion to transfer is not an appealable order and while the court's error might be reviewed upon an appeal from the final judgment, this in our opinion is not a speedy or adequate remedy. Petitioner is therefore entitled to a writ of mandate.
 The judgment is reversed and the superior court is ordered to issue peremptory writ of mandate commanding the respondent court to forthwith and without taking any other proceeding transfer the proceedings against the petitioner to the Municipal Court of the Los Angeles Judicial District at Los Angeles.
 Fourt, Acting P. J., and Lillie, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
