본문 바로가기
728x90

전체 글873

php 오라클 데이터 조회시 오류 해결 php에서 일반적인 db 조회시 HTML 테이블을 이용하여 보여줄때 $row를 td 안에 넣으면 나오지만 오라클은 조금 다른 조건 이 있습니다 아래 사진처럼 값이 나오지 않는 경우가 있습니다 그건 빨간네모박스처럼 컬럼값을 소문자로 입력했을 경우 값이 보이지 않습니다 $row['MEMO'] 로 대문자로 했을때만 제대로 데이터가 조회 됩니다 또는 첫번째 값처럼 SQL조회된 컬럼 순서로 넣어도 됩니다 예를 들어 select id,name,pw from user 의 sql 조회값을 할때는 $row['0'] 의 값은 id $row['1'] 의 값은 name $row['2'] 의 값은 pw 이며 0부터 순서대로 라고 생각하면 됩니다. 이거 해결한다고 몇일걸렸네요;; 324 2023. 1. 28.
파이썬 오라클 연결 코드 Python oracle example 파이썬 오라클 연결 코드 입니다 import cx_Oracle # Connect to the database connection = cx_Oracle.connect("username", "password", "host:port/sid") # Create a cursor cursor = connection.cursor() # Execute a query cursor.execute("SELECT * FROM employees") # Fetch all the rows rows = cursor.fetchall() # Loop through the rows for row in rows: print(row) # Close the cursor and connection cursor.close() connection... 2023. 1. 22.
파이썬 테트리스 코드 Python Tetris game example 파이썬 테트리스 코드 입니다 import pygame # Define some colors BLACK = (0, 0, 0) WHITE = (255, 255, 255) # This class represents the individual blocks that make up a tetromino class Block(pygame.sprite.Sprite): def __init__(self, color, width, height): super().__init__() self.image = pygame.Surface([width, height]) self.image.fill(color) self.rect = self.image.get_rect() # This class represents the tetromin.. 2023. 1. 22.
Error response from daemon: Unknown runtime specified docker-runc 에러 해결법 Error response from daemon: Unknown runtime specified docker-runc Error: failed to start containers: apache docker 로 아파치를 쓰고 있는데 컨테이너가 꺼져있고 시작도 안되었다. /var/lib/docker/containers/[Container ID] 경로로 이동하고 hostconfig.json 파일의 에디터로 열어서 "Runtime":"docker-runc" 항목을 "Runtime":"" 와 같이 공백으로 변경하고 systemctl restart docker 도커 재시작 하면 docker ps 살아난걸 볼수가 있다. 2023. 1. 21.
728x90