Posts

Showing posts from 2019

Django Full Stack Developement - 2: Project Setting

After successful Django installation Create Project :     ⧫ django-admin startproject projectname Example : django-admin startproject FirstProject ⧫ Check created File  Example: ls ⧫  If you want to display  Tree Format structure tree -f ⧫ Start Server Example : python manage.py runserver ⧫ Default Server Started On 8080 Port Number , if you want to change port number (Not recommended) Example : python manage.py runserver 8888 ⧫ Django provide inbuilt Server and database ⧫ Create Application in Project Now         python manage.py startapp TestApp

AJAX JSP

<%@ page import="java.sql.*" %> <% String email = request.getParameter("email").toString(); System.out.println(email); String data =""; try{ Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test1", "root", "root"); Statement st=con.createStatement(); ResultSet rs=st.executeQuery("select * from login where email='"+email+"'"); int count=0; while(rs.next()) { count++; } if(count>0) { data="<img src='favicon.png' width='20px' height='20px'>Email-ID already exists!"; } else { data="You can register now!!!!"; } out.println(data); System.out.println(data); } catch (Exception e) { System.out.println(e); } %> <html> <head> <script type="text/javascript"> function check(value){ xmlHttp=GetXmlHttpObject() var url="index.jsp"

Django Full Stack Developement - 1: Atom Installtion

  Atom IDE Installation In Linux :  Atom is more Powerful IDE for Web Designing    -   sudo add-apt-repository ppa:webupd8team/atom -   sudo apt-get update -   sudo apt-get install atom

Mysql Primary Foreign for Beginners

Here I am goving to create two tables first will be parent and second will be child table. Table are Student and Marks In student table we make rollno as primary key which is act as a foreign in Marks table. ------------------------------------------------------------------------------------------------------------------- sql>> create table student (roll int primary key,name text) sql>> create table marks(sub1 int,sub2 int, sub3 int ,roll int, foreign key(roll) references student (roll)); ------------------------------------------------------------------------------------------------------------------- sql>show tables; student marks here we can created two table succesfully with paarent child relatoinship. --------------------------------------------------------------------------------------------------------------------- Insert data ----------------- If i try to insert data in child table (example Marks table) without adding data in Parent t