0% found this document useful (0 votes)
3 views1 page

ORM Queries for Data Insertion and Retrieval

Uploaded by

POKemon Pokemon
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

ORM Queries for Data Insertion and Retrieval

Uploaded by

POKemon Pokemon
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Insert record into data with ORM queries

========================================

step1:
create object of the Model class

syntax:

obj=[Link](dm1=value1,dm2=value2,..,dmn=valuen)

p=[Link](title=t,sdesc=s,det=d,cat=c,active=act)

step2:

[Link]()

e.g

[Link]()

Retrieve Data from Database


===========================
[Link]:select * from tablename;

step1: retrieve all reccords


-----------------
rec=[Link]()

e.g

rec=[Link]()

step2:pass records to html file for user


-------------------------

content['data']=rec

then pass content dictionary to template file[html file] where


user can see all records.

content[data]

id title sdesc det cat active


x-> 1 my title Small.. Post.. 2 1
x-> 2 My Title Small.. Post.. 2 1
x-> 3
4
5

You might also like