Defendants, Richard J. Daley, Mayor of the City of Chicago, the City of Chicago, and James Y. Carter, Public Vehicle License Commissioner of the City of Chicago, appeal from the judgments of the Circuit Court of Cook County, entered in plaintiff's action for Declaratory Judgment and Mandamus. In the declaratory judgment order the circuit court held certain portions of an ordinance to be "arbitrary, unreasonable and capricious as they apply to the petitioner in this lawsuit and void and of no effect as to him." It issued a Writ of Mandamus ordering defendants Carter and Daley to issue plaintiff an Ambulance-Attendant-Driver's license. It also issued a temporary writ of injunction "restraining and enjoining defendants, James Y. Carter and Richard J. Daley, Mayor of the City of Chicago, and their agents and employees, and each and all of them, from doing or taking, or causing to be done or taken, any action to arrest, prosecute or otherwise interfere in the activities of Leonard Roth as they relate to his engaging in the business or occupation of being an ambulance attendant-driver as defined in the applicable sections of the Municipal Code of the City of Chicago, and more particularly as to his engaging in the aforementioned business or occupation without the benefit of having a valid license as defined in the applicable ordinances of the Municipal Code of the City of Chicago; all until the further order of this Court."
Chapter 103 of the Municipal Code of Chicago provides in part:
"103-12. It shall be unlawful for any person to drive an ambulance or to act as an attendant on an ambulance or to participate in the transportation and care of patients in any manner whatsoever on any public way from place to place within the corporate limits of city without first having obtained a license as an attendant, or as an attendant-driver.
"103-13. All applications for ambulance attendants or attendant-driver license shall be made in the same manner as application for public chauffeur license, and shall be subject to provisions of sections 3, 4, and 6 of chapter 28.1 of this code. .. ."
The pertinent portions of Chapter 28.1 provide:
"28.1-3. Applications for public chauffeur licenses shall be made in writing to the commissioner upon forms provided by him therefor. They shall contain the full name and Chicago street address of the applicant and such other information as may be required by the commissioner to properly identify the applicant and disclose any information as to his character, reputation, physical qualifications, past employment and conduct which the commissioner deems relevant to the question of qualifications of the applicant for a chauffeur's license.
"Every applicant shall be at least twenty-one years old, a citizen or declarant of citizenship of the United States of America and the licensee of an Illinois state chauffeur's license. He shall be able to speak, read and write the English language, be of sound physique, have good sight, not be subject to epilepsy, vertigo, heart trouble or other infirmity of body or mind and not be addicted to the use of drugs or intoxicating liquors which may render him unfit to drive a public passenger vehicle.
"No public chauffeur's license shall be issued to any person who has been convicted of a felony or any criminal offense involving moral turpitude within eight years prior to his application for such license, excepting only if such person shall have received, since the time of his conviction, an honorable discharge from any branch of the armed services of the United States of America, and if, in the discretion of the public vehicle license commissioner, such person is trustworthy of the responsibility imposed by the issuance of such license. No such license shall be issued to any person at any time after conviction of a crime involving the use of a deadly weapon, traffic in narcotic drugs, the infamous crime against nature, incest or rape.
"28.1-4. The character and reputation of each applicant shall be investigated under the supervision of the captain of the police district in which the applicant resides, and a report of such investigation containing any facts relevant to the character and reputation of the applicant shall be forwarded by the captain to the commissioner of police, who shall forward the same to the commissioner together with his recommendation. If the commissioner shall be satisfied that the applicant is of good character and reputation and is a suitable person to be entrusted with driving a public passenger vehicle he shall issue the license. Pending such investigation the commissioner may issue a temporary permit authorizing the applicant to drive a public passenger vehicle until the time designated in such permit. If the investigation is not completed by that time the commissioner may, in his discretion, extend the time of such permit until such further time as in the opinion of the commissioner the investigation can be completed.
"28.1-5. Each applicant for a chauffeur's license shall be examined by a person designated by the commissioner as to the applicant's knowledge of the geography of the city, its traffic regulations and the laws and city ordinances governing traffic and the ordinances governing public passenger vehicles and their operations. If the examination discloses lack of adequate knowledge of the above subject matter, the applicant shall be refused the license. If required by the commissioner, each applicant shall demonstrate his skill and ability to handle a public passenger vehicle safely by driving it through a crowded section of the city accompanied by an inspector designated by the commissioner."
The record shows that plaintiff has been an ambulance attendant-driver since 1955, and since 1961 has operated the Acorn Ambulance and Oxygen Service. Prior to the enactment of chapter 103 in its present form, the sole requirement set by the defendant, City of Chicago, for ambulance attendant-drivers was a certificate issued by the Chicago Board of Health. The pertinent provisions of chapter 103 became effective January 1, 1967. It is admitted that plaintiff has been issued an Ambulance Attendant's Certificate by the Commissioner of Health, and has completed the requisite first aid courses.
Plaintiff submitted an application for an Ambulance-Attendant-Driver's license. The record shows that in 1950 plaintiff was convicted of two counts of Armed Robbery and sentenced to the Illinois State Penitentiary. Defendant, Carter, in his capacity as Public Vehicle License Commissioner, denied the application on the ground that plaintiff could not be licensed because of the express prohibition contained in section 28.1-3 above quoted. Because he deemed plaintiff ineligible to be licensed, he did not conduct the investigation and examination provided for in 28.1-4 and 28.1-5.
Defendants contend that enactment of the provision prohibiting the issuance of ambulance attendant and attendant-driver licenses to persons convicted of certain criminal offenses is a valid exercise of the police power, and the circuit court erred in holding the portion of the ordinance void insofar as it applied to plaintiff. They argue further that the trial court's order is neither based upon, nor supported by the pleadings.
[1-3] It is settled that under the delegations of police power from the State, a city may regulate occupations, the unrestricted pursuit of which might injuriously affect the health of its citizens; that whether an ordinance is unreasonable and arbitrary is primarily a question for legislative determination; that the city council is the judge in the first instance of those matters and the courts will not interfere unless the exercise of its judgment and discretion is manifestly unreasonable. Father Basil's Lodge, Inc. v. City of Chicago, 393 Ill. 246, 65 N.E.2d 805. It is equally well settled that enactments which are arbitrary, unreasonable and unrelated to the public purpose sought to be attained, or which are arbitrary in that although reasonably designed to promote the public interest, they effect classifications which have no reasonable basis, are invalid and cannot stand. City of Chicago v. Vokes, 28 Ill.2d 475, 193 N.E.2d 40.
 In our opinion the provisions set forth in the last sentence in the last paragraph of 28.1-3 result in classifications which are unreasonable and arbitrary. Under these provisions an applicant who had perpetrated multiple murders by strangulation, poison or arson could be licensed, as could one who had been repeatedly convicted of Attempt To Rape, Burglary, Theft, Kidnapping or Aggravated Battery. In view of this fact, we fail to perceive in what manner the prohibition contained in the ordinance bears any relationship to public health or safety. In our opinion the circuit court correctly held this portion of the ordinance invalid as to the plaintiff.
 The argument with respect to the pleadings is that plaintiff did not plead that the classification in the ordinance is unreasonable, arbitrary and void, but only that it should not be applied to him. We have examined the pleadings and conclude they are broad enough to support the prayer and the judgment. Assuming arguendo they are not, under the provisions of section 46 of the Civil Practice Act (c 110, § 46, Ill Rev Stats) and Supreme Court Rule 362, any necessary amendment can be made in this court, either on motion of the parties or by the court of its own motion, and absent evidence of defendants' being prejudiced in any manner by the alleged deficiency of the pleadings, the judgment will not be reversed on this ground.
Defendants argue that assuming the invalidity of a portion of the ordinance, the trial court erred in ordering the writ of mandamus to issue. They point out that paragraph 20 of chapter 103 of the Chicago Municipal Code provides that if any portion of the ordinance is held unconstitutional, such portion shall be deemed a separate and distinct provision and the holding shall not affect the validity of the remaining portions. They further argue that while a court may direct that action be taken, the writ must be restricted to directing that action be taken, but may not direct what action be taken.
Plaintiff argues that the pleadings have placed in issue each of the qualifications necessary to plaintiff's being issued the license and the court found him qualified for and entitled to the license. Relying upon People ex rel. Zaransky v. Chicago, 293 Ill.App. 301, 12 N.E.2d 239, he contends the court properly ordered the license to issue.
 The evidence shows plaintiff to be an experienced ambulance operator, and as stated above, he has completed the first aid training, and the Commissioner of Health has issued him the certificate requisite to his being licensed. There is not, however, any evidence with respect to plaintiff's knowledge of the geography of the defendant City, and assuming there were, plaintiff's qualifications, character and reputation are in the first instance matters for administrative determination. The writ should have directed defendant Carter to take the action required by the ordinance, and erred in directing what action he was to take. The People ex rel. Walsh v. Board of Commissioners of Cook County, 397 Ill. 293, 74 N.E.2d 503.
In People ex rel. Zaransky v. Chicago (supra) the city refused to issue a license on the sole ground that Zaransky had been convicted of a crime, when in fact his conviction had been reversed and a retrial had resulted in acquittal. That case is clearly distinguishable on its facts, for the reason that there remained no determination required to be made by the defendant City prior to issuance of a license. Here, although the classification is declared invalid and inapplicable to plaintiff, there remain for administrative action the investigations and determinations provided for in the ordinance.
[7-9] We now consider the propriety of the issuance of the temporary injunction. Whether a petition for a temporary injunction should be granted or denied rests largely in the discretion of the trial court, O'Brien v. Matual, 14 Ill.App.2d 173, 144 N.E.2d 446. On appeal the sole question presented is whether the trial court abused its discretion in granting the temporary injunctive relief, and unless there has been such abuse of discretion, the order of the trial court will not be disturbed. H.K.H. Development Corp. v. Metropolitan Sanitary Dist. of Greater Chicago, 47 Ill.App.2d 46, 196 N.E.2d 494. We are unable to say that the trial court abused its discretion.
For the reasons stated, insofar as it holds the following provision of chapter 28.1-3 of the Municipal Code of Chicago, to wit:
"No such license shall be issued to any person at any time after conviction of a crime involving the use of a deadly weapon, traffic in narcotic drugs, the infamous crime against nature, incest or rape."
invalid and inapplicable to plaintiff, the declaratory judgment is affirmed. The judgment ordering the writ of mandamus to issue is reversed, and the cause is remanded to the Circuit Court of Cook County with directions to enter judgment ordering the issuance of a writ of mandamus ordering the defendant, James Y. Carter, in his capacity as Public Vehicle License Commissioner of the City of Chicago to consider and act upon plaintiff's application for an Ambulance Attendant-Driver's License. The order allowing plaintiff's petition for temporary injunction is affirmed.
Judgment affirmed in part, reversed in part and remanded with directions.
MORAN and EBERSPACHER, JJ., concur.