ive been develop a project known as ordering system i need to delete data from db by clicking the button ive follow a tutorial from utube and to the exact same code he been used error "object reference not set to an instance of an object" ive double check my db dan the code in vb, there nothing wrong i hope some could help me code used for db : Private Sub Delete(id As String) Dim str As String = "server = localhost; userid = root; password = 1234 ; database = kedaikopimamba_db" Dim MysqlConnection As New MySqlConnection(str) MysqlConnection.Open() Dim …

Member Avatar
Member Avatar
+0 forum 6

Hi, i am working on program that connect to database, and user then cans see, edit, insert and delete data in mysql database. I have problem whit update query, can somone help me whit this. User need to click on cell and enter/change data, then hit enter to save changes. import wx import wx.grid import MySQLdb class SimpleGrid(wx.grid.Grid): def __init__(self, parent): wx.Panel.__init__(self, parent) self.currentlySelectedCell = (0, 0) self.myGrid=wx.grid.Grid(self) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.myGrid, 1, wx.EXPAND) self.SetSizer(sizer) self.myGrid.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.myGrid.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.onSingleSelect) self.db = MySQLdb.connect("127.0.0.1", "usename", "password", "database") self.cursor = self.db.cursor() self.display() def display(self): data=(self.getData()) nrw=len(data) ncl=len(data[0]) self.nrw=nrw self.myGrid.CreateGrid(nrw+1, ncl) self.myGrid.SetColLabelValue(0, "idSetup") self.myGrid.SetColLabelValue(1, …

Member Avatar
Member Avatar
+0 forum 3

I'm looking more and more about answer for my question. When I open mysql query browser first time, there is place that we can create new mysql connection. I want to create connection like this. In the 4 computers connected to a LAN network. I name these computers A,B,C,D for easy identiting on this example. Think A is the only mysql installed computer and database server. For other computers I installed program wich I made with vb.net 2012. From that B,C,D computers When I entering data, I want to save those data to sql installed computer. I have 2 question …

Member Avatar
Member Avatar
+0 forum 1

hello there. in order to gain experience I started a small python project. it is an more or less simple, collaborative address book (Snow Leo and Python 2.6.1). the final step is to create a standalone programm. to create the address book I used PyQt4 and MySQLdb. since py2app chokes heavily on MySQLdb, I tried pyinstaller. [CODE] File "<string>", line 60, in <module> File "PyInstaller/loader/iu.py", line 449, in importHook File "PyInstaller/loader/iu.py", line 539, in doimport File "Friver/build/pyi.darwin/Friver/outPYZ1.pyz/gui", line 6, in <module> File "PyInstaller/loader/iu.py", line 449, in importHook File "PyInstaller/loader/iu.py", line 539, in doimport File "Friver/build/pyi.darwin/Friver/outPYZ1.pyz/handler", line 3, in <module> File …

Member Avatar
Member Avatar
+0 forum 3

Hi everybody, i want know how make admin panel and to it news system via [b]PHP[/b] and [b]Mysql[/b]! Is here anybody who knows how make it, and if here is somebody who knows, then can you help me? I'll try make a website where is news about sport things what happens etc. My idea was that i will make it just for Finland users but if here is somebody who is interested, then we can make also it on English and Finnish! Like there is admin panel and we give to some users rights to make news in Finnish, and …

Member Avatar
Member Avatar
+0 forum 3

Hello All I am having an odd issue with mysqldb connection from python to a database. The issue is, when I run the query directly or via a sql client like navicat or toad, I get the required value, but this does not happen via python/mysqldb combo. This is the query which i am running.. SELECT count(*) FROM hesk_tickets WHERE lastchange BETWEEN DATE_SUB(NOW(), INTERVAL 9 HOUR)AND NOW() AND category = 4 AND `status` ="3"; The above query returns the value 1 from toad. but from python it is returning Zero. >>> cursor.execute ('SELECT count(*) FROM hesk_tickets WHERE lastchange BETWEEN DATE_SUB(NOW(), …

Member Avatar
Member Avatar
+0 forum 6

I have create in MySQdb a DB with a table named example,in this table i want to save a name, this name is in Greek language.My problem is thw follown when i try to save the name instantly without use textctrl, its ok but when i use textctrl i take error.Look the code: Can anyone hel me please i have try encoding in utf-8,decoding in utf-8, to unicode but nothing. [CODE] import os import math import random import wx import MySQLdb import sys APP_SIZE_X = 500 APP_SIZE_Y = 300 # -*- coding: utf-8 -*- class MyFrame(wx.Frame): def __init__(self, parent, id, …

Member Avatar
Member Avatar
+0 forum 2

So i was busy playing around with the python module MySQLdb and looking at sql injection. [CODE] import MySQLdb def hack(name): db=MySQLdb.connect('xxx','xxx','xxx','xxx') cursor=db.cursor() sql="SELECT * FROM PLAYERS WHERE NAME = %s" %(name) print sql cursor.execute(sql) print cursor.fetchall() [/CODE] i entered Hack("'pete' OR '1'='1'") results were: SELECT * FROM PLAYERS WHERE NAME = 'pete' OR '1'='1' and the entire database of players showed up but when i entered '%s' in the sql statement results were: SELECT * FROM PLAYERS WHERE NAME = ''pete' OR '1'='1'' with an error message. So just to ask, adding '' to %s treats the entire user …

Member Avatar
Member Avatar
+0 forum 2

I have created an online form and am trying to post the info into a mysql database and I keep getting back a query error. Below is my PHP code. If anybody can help me, that would be great. Thanks a lot. [CODE] <?php $property_type = $_POST['property_type']; $number_of_bedrooms = $_POST['#_of_bedrooms']; $number_of_bathrooms = $_POST['#_of_bathrooms']; $state_province = $_POST['state_province']; $city = $_POST['city']; $address = $_POST['address']; $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $additional_info = $_POST['additional_info']; $dbc = mysqli_connect('localhost', 'circlema_shnips6', 'rhiannon', 'circlema_propertydatabase')or die('Error connecting to MySql server'); $query = "INSERT INTO circlema_propertydatabase (property_type, number_of_bedrooms, number_of_bathrooms, state_province, city, address, " . "name, email, …

Member Avatar
Member Avatar
+0 forum 8

trigger i am wrting on mysql table i have a tool in which i am calcultaing marks 140 atomic questions and now i want add 4 questions marks and assign to one major questions. how should i approach it. begin ("$value.governance and accountability") = ("$value.existence of a governing board") + ("%value. Board meetings held as per bye laws"); end

Member Avatar
Member Avatar
+0 forum 3

hi guys, i wanted a table to get created with the table name submitted from the form. how shall i go about this, i have tried it with my basic knowledge its here bellow but it dint work well, please help me anyone. [CODE] <?php if (isset($_POST['update'])) { mysql_connect('localhost', 'root', 'jackson'); extract($_POST); mysql_query("CREATE table `praveen` . '$_POST[id]'(id int, amount varchar(10), DTMY text(30))"); } ?> <form name="new_member" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="new_member"> <h4>New Member</h4> <label>id :</label><br /> <input name="id" type="text" id="id" value="<?php print rand(1, 100000); ?>" readonly="readonly" /><br /> <input type="submit" value="update" name="update" /> </form> [/CODE]

Member Avatar
Member Avatar
+0 forum 3

hi, I want to import a text file which delimited by tab to mysql. 1) using phpmyadmin => results ( exceed time limit even i've extend) 2) open using excel file save to .csv but still couldn't save all the record 3) using ms access with odbc connection => almost get all the data but not in sequence 4) using command => record is seems like not follow the real sequence which suppose to insert from top of the text file to bottom. now i'm blur how how to get the detail correct in with the position. anyone please

Member Avatar
Member Avatar
+0 forum 12

I am creating a website where when an unregistered user comes to the site they'll only be able to access a limited amount of the site. It's only when they pay for access to the site that they can receive the full content. I'm wondering how I should go about this? Is it possible to do this using just 1 joomla database, or would I have to create two? Meaning 1 for the limited content, and another for the full content. If so, would it be possible to have two databases working properly within 1 web host account? Actually my …

Member Avatar
Member Avatar
+0 forum 1

hello guys i have a question bout my sql. I create a system in vb.net using my sql database but the problem when i create a report using microsoft report viewer it does not detect mysql database whether i create a new connection..what is the problem??..

Member Avatar
Member Avatar
+0 forum 2

I want to use MySQLDB to connect MySQL but I got a problem. the problem is: --------------------------------------------------------------------------------- cs6201:/home/lamwaiman/python/data # python dm.py Traceback (most recent call last): File "dm.py", line 11, in <module> import MySQLdb File "build/bdist.linux-i686/egg/MySQLdb/__init__.py", line 19, in <module> File "build/bdist.linux-i686/egg/_mysql.py", line 7, in <module> File "build/bdist.linux-i686/egg/_mysql.py", line 6, in __bootstrap__ ImportError: /root/.python-eggs/MySQL_python-1.2.3c1-py2.6-linux-i686.egg-tmp/_mysql.so: undefined symbol: __pure_virtual ---------------------------------------------------------------------------------- I've searched google, some people said this may because compiler mismatch between MySQL and Python, I checked: -------------------------------------------------------------------------------- lamwaiman@cs6201:/usr/bin> strings -a mysql | grep -i gcc | uniq -d GCC: (GNU) 4.2.1 (SUSE Linux) lamwaiman@cs6201:/usr/bin> strings -a python | grep -i gcc …

Member Avatar
Member Avatar
+0 forum 18

Hi there! I new learner in Python. And just couldn't get threading. I wrote this script. [CODE] import sys import MySQLdb if len(sys.argv)!=3: """the program name, mac and ip makes three""" """stop program and send error""" sys.exit("Must provide mac and ip!") mac = sys.argv[1] ip = sys.argv[2] print 'Connected to server' #saving ip to database! # Open database connection db = MySQLdb.connect("localhost","user","pass","dbname" ) # prepare a cursor object using cursor() method cursor = db.cursor() # Prepare SQL query to UPDATE required records sql = "UPDATE mac_list SET ip ='"+ip+"' WHERE mac='"+mac+"'" try: # Execute the SQL command cursor.execute(sql) # Commit …

Member Avatar
Member Avatar
+0 forum 4

The End.