10,932 Topics

Member Avatar for
Member Avatar for Chad Gary

The below mysql query yeilds the following result: [CODE]SELECT COUNT(ProgramType) AS Counter FROm credential_state GROUP BY ProgramType;[/CODE] Results: Counter 4 7 7 I would like return the max from the above (7). The following query is giving my an error that says: Every derived table must have its own alias. …

Member Avatar for darkagn
0
72
Member Avatar for vishalonne

Can any one help me in solving my problem. My problem is I have Windows 2003 server which maintain different user with different authentication. No I am developing a login program in PHP (PHP and CSS file is attached) I need to fetch the user details from Active Directory of …

0
72
Member Avatar for benkyma

I need to make ten selections. One of all the datetimes in the last 24 hours, the next one from 24 hours to 48 hours, and on back in 24 hour blocks for the last ten days. I've tried various approaches to this, but this is what I currently have: …

Member Avatar for benkyma
0
87
Member Avatar for levsha

I tripped on this one. I have an HTML form that has all kinds of input elements - text, textarea, radio buttons and checkboxes. I have no problem inserting or updating data in MySQL DB from the HTML form. But when I want to display what is already in the …

Member Avatar for venkat0904
0
178
Member Avatar for rbushlow

I have the following python code to access a MySQL database: [CODE] #!usr/bin/python # server_version.py - retrieve and display database server version import MySQLdb con = MySQLdb.connect (host = "localhost", user = "username", passwd = "password", db = "test") cursor = conn.cursor () cursor.execute ("SELECT VERSION()") row = cursor.fetchone () …

Member Avatar for rajasekhar1242
0
178
Member Avatar for Arianna

Just so you know, I'm a PHP beginner, so I won't understand complicated stuff or anything of the like. xP I've started to make a part of my website (may I link to it, or should I just post the code) and I'm pretty happy with it. A user can …

Member Avatar for Arianna
0
277
Member Avatar for tmv105

Can someone help me store a string that has an apostrophe within it? I thought that using [B]mysql_real_escape_string[/B] was supposed to add a slash when retrieving, but remove the slash before storing. Here is a portion of my code and then also the result of the data after it is …

Member Avatar for Atli
0
125
Member Avatar for jrosh

I got a query to calculate the percentage as , [CODE] Select votes, rating, votes/sum(votes) as percentage [/CODE] But I want to take the values from two different tables. I tried [CODE] Select elec.sum(votes) from elec, stat.sum(rating) from stat where year=2009, elec.sum(votes)/tat.sum(rating) as percentage; [/CODE] This doesn't work. plz help.

Member Avatar for jrosh
0
98
Member Avatar for ramjeev
Member Avatar for masijade
0
191
Member Avatar for Carcinosi

Hello, I have a MySQL 5.0 Database used for management of my service, with 13 tables. The two tables most important now are "customers" and "cust_packages". The table "customers" has one column "cust_email". This column has e-mails of customers of the my service. The table named "cust_packages" has one column …

Member Avatar for nav33n
0
125
Member Avatar for JackSkylar

I keep getting this message Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/j/a/c/jackattacksite/html/register.php on line 80 Here's the code: [CODE=php] // Connect to database include_once "scripts/connect_to_mysql.php"; $emailCHecker = mysql_real_escape_string($email1); $usernameChecker = mysql_real_escape_string($username); $emailCHecker = eregi_replace("`", "", $emailCHecker); $usernameChecker = eregi_replace("`", " ", $usernameChecker); // Database …

Member Avatar for ShawnCplus
0
312
Member Avatar for codewalkz

mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("test") or die(mysql_error()); $root = 1; function display_tree($root) { // retrieve the left and right value of the $root node $result = mysql_query('SELECT lft, rgt FROM tree '. 'WHERE name="'.$root.'";'); $row = mysql_fetch_array($result); // start with an empty $right stack $right = array(); // now, …

Member Avatar for sam023
-1
167
Member Avatar for cwarn23

Hi and I have been working on a project involving a rather large database. My question is "For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the …

Member Avatar for mwasif
0
238
Member Avatar for futhonguy

Hi, I am trying to get the primary key (which is number) from a field of the same table. however i encountered "Undefined index" shown on my screen. [CODE] $orange_insert = "INSERT INTO orange (orange_id, orange_name, orange_add) VALUES (NULL, '$val_name', '$val_add')"; $result = mysql_query($orange_insert) or die (mysql_error()); $orange_sel = "SELECT …

Member Avatar for futhonguy
0
149
Member Avatar for kent01981

For example, when searching string_1 in MySQL table found NO RESULT, then want to add string_1 into database table. Using code below: while (res->next()) cout<<"This word means "<<res->getString(2); if (res==0)/[U]/I use this if statement , but don’t work![/U] { cout<<"Would you like to add this word to database?"<<endl; } What …

Member Avatar for Ancient Dragon
0
113
Member Avatar for katharnakh

I am facing problem connecting problem connecting remote MySQL server which is firewall protected. I used the valid user name and password, but it throws me the error [I]OperationalError: (2003, "Can't connect to MySQL server on 'www.myreomtemysqlserver.com' (10061)")[/I] I want to connect from python. I searched in Google is there …

Member Avatar for wendymclee
0
249
Member Avatar for Samyx

How can I use this query to calculate the max average grade? [code] SELECT dname, cno, sectno, avg(grade) FROM enroll GROUP BY dname, sectno, cno;[/code]

Member Avatar for pritaeas
0
54
Member Avatar for rbushlow
Member Avatar for PrettyNormalGrl

Hi I really hope I am posting this in the correct forum area. I have a html page on my currently existing web site where I sell books over the internet. I need to change this page so that it can do a search on my MySql database that I …

0
57
Member Avatar for AirGear

i have a project that implements the using of database. i chose to use php as the application interface and mysql as the database. at the end of this month, we should submit the softcopy. now, i'm confused with the files of my project. i'm using wamp server, and in …

Member Avatar for AirGear
0
131
Member Avatar for Horizon1

Is there a simple way to link up a data website to my newly created Access program? I need specific information to fill in the tables, and currently I am manually entering the info in from the site; it would be much easier to have this website post it for …

0
80
Member Avatar for SAINTJAB

Hi, I want to create a mysql table in a database in C#. this table should have unlimited fields where the user can add more information to it without having to overwrite the already existing information. I want to do this cos I will not know the amount of info …

Member Avatar for Geekitygeek
0
505
Member Avatar for wchitamb
Member Avatar for sfsrocky

[icode] "My wamp server got damaged recently and i had no backup for my databases. I had reinstalled the wamp server and replaced the bin/mysql/data folder to the new one but I only get the database and not the tables inside it. I need help!!!!!!!! "; [/icode]

Member Avatar for network18
0
40
Member Avatar for Sucesso

Hi, everybody. I've been a member for a while, but I'm not a coder, so I haven't made any posts. But I get frustrated not knowing how to do things. So I'm taking the plunge. I'm working through a tutorial on PHP and MySQL (here: [url]http://dev.mysql.com/tech-resources/articles/ddws/[/url]), and things have been …

Member Avatar for venkat0904
0
219
Member Avatar for romilc

the following is the code: [CODE] <%@ page import="java.util.*" import="java.sql.*" import="java.io.*" language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <% Integer hit = 0; Connection con = null; Statement stmt=null; ResultSet rs = null; %> <% try { out.println(); Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/lab2","root","root"); stmt=con.createStatement(); rs=stmt.executeQuery("SELECT hitCount from table1"); hit = rs.getInt("hitCount"); hit = hit …

0
78
Member Avatar for Venom Rush

I have a database that needs to hold names of people from all around the world. Some names have special characters in them such as é and ¢ Is there a character set I can use that will accept any character no matter what language it is (with the exception …

Member Avatar for Venom Rush
0
190
Member Avatar for urmi

Hi; I want to connect MySQL database from turbo c++.I have installed MySQL 5.0.Also MySQL c++ connector.But it's not working.How can i connect.Any body have any procedure for it? Is it possible to connect it directly without any connector?If yes,then how?

Member Avatar for kvprajapati
0
99
Member Avatar for mahakaal
Member Avatar for jrosh

I created some data files with 'outfile ' command. The files are created in the mysql folder.{I use WAMP} I want to create those files in another directory. How can I do that? Thankx in advance.

Member Avatar for jrosh
0
158

The End.