Programming :: PHP & MySQL - Query A Database From The Web?

Apr 26, 2010

I have created a database which stores students grades for different stages of a project. One of the stages of the project is the specification part. I have a simple bit of html code which is going to be used as the searching facility. I want the user to be able to enter their ID and then it will display only their results. At the moment, it is displaying the results for EVERY student because I cant seem to find the correct syntax for my statement.

Heres the HTML code

<html>
<head>
</head>
<body>
<body bgcolor="#6881bb">
<center>

[Code]....

At the moment when i click the button, no matter what I enter every students marks appear on the screen.

I think, but obviously dont know for sure because if i did i would know how to solve the problem, the code that i need to change is in green.

View 3 Replies


ADVERTISEMENT

Programming :: Web Page On Apache Server Query MS Access Database

Jan 18, 2010

I have an access database and I would like to build a website on the slackware 12.2 server running apache 2.11.14 to let users query data from the MS Access database. I am thinking that I could just do it in jscript and make a jdbc connection and that should be good. What do you guys think.

View 2 Replies View Related

Programming :: Insert Query In Mysql ?

Jul 12, 2011

When i enter this query to mysql:

Code:

return this error:

Code:

when i delete the insert part :

Code:

query is ok:

Code:

1 row in set (0.00 sec)

View 2 Replies View Related

Programming :: Duplicate Value In Select - Mysql Query ?

Dec 2, 2010

Trying to export a Mysql query to a .csv file the query draws from multiple tables, e.g. sales, purchase and currency

Code:

What i'm trying to do is to export both the sales and purchase to a single line where both the currency for the sales and the purchase is specified.

Basically like this:

Code:

Problem here is that i'm stating currency.value twice in the same select and don't know how to define which currency.value applies to sales and which to purchase.

View 7 Replies View Related

Programming :: PHP / MySQL Statement - Query Result

Jan 29, 2011

It is under PHP/MySQL
$queryresult = $conn->query("INSERT INTO normalrequests VALUES($finalkey, 1234, 5678, FALSE)");
It is connected to the database successfully but I feel there is something wrong with the statement up there.

View 6 Replies View Related

Programming :: Send A Mysql Query Output Into An Array?

Jul 27, 2010

i will be quick, im trying to send a mysql query output into an array ie:

Code:
declare -a HD
HD=`echo "USE db; SELECT uid FROM user" | mysql -u $login -p$pwd -h $dbhost -B`
echo ${#HD}
those vars in mysql connection are previously and correctly assigned.
but got an error

script.sh: 2: declare: not found

View 3 Replies View Related

Programming :: Looping Over Mysql Query Results In Bash?

Sep 15, 2010

I am querying a single string column in a table. The string values have spaces in them. I want to loop over each value in bash. I set IFS to split lists on newlines instead of spaces. When I try this, it is splitting the list of results on the actual character 'n', not the newline ''.

DATA=`mysql -u root -ppassword --silent 'SELECT name FROM table_a;'`
IFS=$'
'
for i in $DATA; do
echo "item = $i"

[Code]....

View 5 Replies View Related

Programming :: Change A Mysql Query Result Prior To Display?

Oct 17, 2010

I am not sure if this is possible. I have IP's stored in a mysql database. When I query the database, it returns the IP. I would like to replace the IP with something else prior to displaying the results. Is it possible even though I have not stored it in the database?

I have the following in a while loop (mysql_fetch_array).

Code:
<td align="left">' . $row[IP] . '</td>

Instead of displaying $row[IP] from the database, I would like it to display something else which I define in the PHP code but based on the IP.

ie. aaa.bbb.ccc.ddd = hostnameABC

View 4 Replies View Related

Programming :: Split Mysql Date Query Or Hide Some Output?

Feb 22, 2011

So I've got a rather vast database, one of the columns is date in the following format: DD/MM/YY HH:MM:SS. This is starting to cause problems with a php page I'm writing which asks the user for a 'start date'. Would it be better for me to split the date column into date and say time? Or is there a way of using distinct and masking the times.

View 10 Replies View Related

Networking :: Database Error: Unable To Connect To Database:The MySQL Adapter "mysql" Is Not Available

Jun 16, 2011

I've setup a CentOS apache web server, and loaded a site onto it. The site previously was functioning under windows xp (before I "stepped in") and wamp. What I did was copy the site in /var/www, reconfigure the httpd.conf (DocumentRoot /var/www/site, etc). Although when I try to open the webpage I get this error: Database Error: Unable to connect to the database:The MySQL adapter "mysql" is not available.

[code]...

View 10 Replies View Related

Programming :: Convert Access Database To Mysql?

May 3, 2010

I'm trying to migrate my company server to linux, but i have a program that is designed in access what is the best way to move access tables to a mysql database so that i can program it in PHP?

View 3 Replies View Related

Programming :: Store Pictures In A MySQL Database In PHP

Apr 29, 2010

How do I do this? I wish to store the pictures via a "Browse" button on the webpage, and later display them on a particular page on the site.

View 2 Replies View Related

Programming :: Getting Duplicate Entries In Mysql Database?

Apr 13, 2011

I'm getting duplicate entries in mysql database when submitting a new item from a form. I initially loaded the database via IMPORT function in phpMyAdmin. This is my input form:

<center>
<br />
<FONT SIZE="5" ><b>Add Item Template</b></FONT>
<br />

[code].....

However, I do need to return the input form in order to keep entering new items into the database.

View 8 Replies View Related

Programming :: Insert Values Into A MySql Database?

Feb 9, 2010

I want to insert values into a MySql database. The following line works fine:1

Code:
mysql_query(connection, "INSERT INTO main (NumofShows , Title) VALUES('12', 'Home')");
but if the data to be inserted is from a string... like....
Code:
string NewTitle = "Monaco";
string NumofShows = "2";

How do i edit my sql statements so variables can be inserted into the Values ( ) , and it will be able to read the variables and then store it into the database.

View 4 Replies View Related

Debian Programming :: HTML5 To Access MYSQL Database

Jul 24, 2013

I have a MySQL database running on my local server, which I currently access via laptop, desktop using HTML/PHP.I want to re-write in HTML5, I have gone through a couple of HTML5 tutorials but cannot figure out the database interface. The best match I can find is Server-Sent Events, is this the best way forward? What about writing to the database? I have found several suggestions using Web SQL database but I don't think this is suitable as my database is also accessed from Python code on the server.

View 5 Replies View Related

Programming :: Automating Data Entry Into MySQL Database?

Jul 19, 2010

I have set up a MySQL database which has only three fields for user-name, password and index number. But there is a LOT of data (thousands of columns) which would take too long to enter manually. I'm sure MySQL must have a file format whereby a single large file containing different data types can be successfully automatically imported and the various data elements distributed to their intended fields. Does anyone know which characters MySQL uses as field seperators for this formatting of data, or is there a program already written which can take raw data and organize it into a SQL compatible file?

View 8 Replies View Related

Programming :: Filtering MYSQL Database Input In PHP Does Not Work

May 30, 2011

I am trying to make a PHP form where the user inputs a text string, and then it is stored in MYSQL db

1.php

Code:
<form action="2.php" method="post">
Your name: <input type="text" name="txt_name" />
<input type="submit" />
</form>

[Code]....

View 1 Replies View Related

Programming :: Translate Data From A CSV File To A MySQL Database?

Aug 26, 2010

I have a CSV called source1 with data like:

Date12:00:00 AM12:30:00 AM01:00:00 AM01:30:00 AM02:00:00 AM02:30:00 AM03:00:00 AM ...
07/31/1051.5252.4852.6452.863.3663.8445.6 ...
08/01/1049.4449.9261.2860.1652.6449.1247.52 ...
08/02/1049.1248.9648.9650.7260.1658.0851.04 ...
08/03/1060.3260.6459.260.9637.9233.2832.8 ...

[Code].....

Also, the CSV file is updates every few hours and I need to load any new data from the file to the database without creating duplicates of data that has already been loaded to the database.

View 6 Replies View Related

Programming :: Script To Read Mailbox And Save Items To A MySQL Database?

Sep 8, 2010

I would like to make a script which reads a POP3 mailbox on another server and saves the items in the mailbox to a MySQL database. Is this possible? I have to make this script to create monitoringen scripts which has to use the messages in the mailbox.

View 2 Replies View Related

Ubuntu :: Connecting Database With Java Query Program?

Jun 22, 2010

I've got a database and I've got a Java program that I'm programming in Netbeans that is suppose to run queries to the database. how I will set about to connect the database with the Java program so that I can run the queries?

It is very important that I learn how to do this, else I am forced to go back to XP in order to finish this project on time.

View 2 Replies View Related

Ubuntu Servers :: Mysql Error Stopping MySQL Database Server Mysqld?

Jun 17, 2010

I have installed Mysql in Ubuntu 9, for the use of roundcube database.After installing iam getting the error like this

* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.

So because of this in the roundcube configuration its giving the error message that MYSQL is not installed. So Kindly give me a idea how to solve this.

View 1 Replies View Related

Software :: Connecting To Mysql Database - Can't Connect To Local MySQL Server Through Socket

Aug 25, 2010

I'm having problems connecting to the mysql database on my system. I first noticed this when I was trying to set up the program anymeal. I subsequently tried using MySQL Administrator (mysql-admin), but had no luck. It gives my the following feedback:

Code:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Click the 'Ping' button to see if there is a networking problem. I press the ping button, and it seems to connect.

Code:

View 4 Replies View Related

General :: Create A New Mysql User And A Mysql Database At The Shell Prompt?

Aug 7, 2010

How do I create a new mysql user and a mysql database at the shell prompt?

View 1 Replies View Related

Slackware :: Postfix - Cyrus SASL Authentication - Pam-mysql - Mysql Database

May 10, 2011

Pam-mysql can not connect to the database and below are my configurations.

saslfinger -s Output:
root@mailbackup:/# saslfinger -s
saslfinger - postfix Cyrus sasl configuration Tue May 10 10:12:10 EAT 2011
version: 1.0.2
mode: server-side SMTP AUTH

-- basics --
Postfix: 2.7.2
System: Slackware 13.1.0

-- smtpd is linked to --libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x00007f74ebfb7000)

-- active SMTP AUTH and TLS parameters for smtpd --

-- listing of /usr/lib64/sasl2 --

-- listing of /usr/local/lib/sasl2 --

-- content of /usr/lib64/sasl2/smtpd.conf --

-- content of /usr/local/lib/sasl2/smtpd.conf --

-- active services in /etc/postfix/master.cf --

-- mechanisms on localhost --

View 3 Replies View Related

Fedora Installation :: Database Conversion From Mysql 4.1.22 To Mysql 5 For A Client?

Apr 2, 2009

I have the latest LAMP running on F10 but need to do a database conversion from mysql 4.1.22 to mysql 5 for a client.

View 4 Replies View Related

Ubuntu :: Wiki Database Query Software (Edit Related Articles)

Apr 7, 2010

I need some piece of software that follows the requirements below. So here's the scenario:

1. I need some piece of software that will allow me to edit related articles in a wiki-like fashion. I will be the only one editing this "wiki" though.

2. I need to be able to do searches/queries on the wiki content in a very flexible but also very concise way:
- The usual search for an expression in all articles or only some category(ies) but also:
- Wiki links to other wiki pages based on configurable criteria, e.g. articles belonging to some category(ies): I mean something like right-clicking would open a sort of database form to perform a query that would use the said link as expression but would only be run after you'd chosen your other criteria.
- If anyway possible, do the above for any selected text on the page you were watching...

3. Ideally this would be one single application of course. But I'm perfectly alright with coupling two or even more together as long as they do integrate with each other flawlessly.

View 8 Replies View Related

OpenSUSE :: MySQL Query Browser For 11.4?

Apr 14, 2011

Can query browser be installed in 11.4??

I've tried to use workbench but it's such a big step backwards in that you can't easily edit the output from a "select x,y,z from table" query. I'd have thought that was a pretty basic requirement...

View 5 Replies View Related

General :: Adding DATE_SUB To A Mysql Query?

Sep 21, 2010

I have the following mysql query which works great.


Code:
SELECT msg FROM `logs` WHERE ((`host` = 'aaa.bbb.ccc.ddd') OR (`host` = 'aaa.bbb.ccc.ddd')) AND `msg` REGEXP CONVERT( _utf8 'physical addresses' USING latin1 ) COLLATE latin1_swedish_ci
I need to refine this query so that I can query the last # hours using the `datetime` field in the database. I have researched the DATE_SUB function and can query for example the last 1 hour like this:

[Code]....

View 10 Replies View Related

General :: MySQL Slow Query Log Rotate ?

Jan 17, 2011

I am on a CentOS 64 bit and used webmin to rotate MySQL slow query log. Now the thing is although logs are being rotated daily but the new log files being created are empty which means MySQL is unable to write them due to some reason. I have checked using "ls -l" that both permission and owner of files is same but still MySQL is not writing logs. What could be the reason?

View 10 Replies View Related

Server :: MySQL Query Browser Connection Help

Jan 28, 2010

i have MySQL on my CentOS server and have installed it and got it up and running through the command line.

I have changed root's username and password so there is no user called 'root' anymore. I also created a database called pancakes.Now when i try to log in using Query Browser, i put the server's IP in 'hostname', my new roots username and password in 'username' and 'password'.When i try to log in it gives me error 1130 and says connection from myhostname not allowed.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved