mysql

MySQL rejecting parameter

Ok, I'm going crazy on this one. MySQL is throwing a fit about this bit of SQL: INSERT INTO `test_table` ( `column1`, `column2` ) VALUES ( ?COURSEID, ?COURSENAME ) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COURSENAME )' at line 1 My d...

Driver Connetion String

I am new to JSP and I am trying to make a connection to a mysql database. I am using Connect/j driver but I cant find the connection string for my Class.forName() method. Please give me suggestions ...

Searching a database of names.

I have a MYSQL database containing the names of a large collection of people. Each person in the database could could have one or all of the following name types: first, last, middle, maiden or nick. I want to provide a way for people to search this database to see if a person exists in the database. Are there any off the shelf products...

Building site.. custom inventory system.. cart recomendation?

I am building a site using code igniter. I am developing a custom product catalog using php and mysql. What is the best way to go about making those products purchaseable online. I thought about writing my own cart, but I am a little worried about how much time that would take. Most carts I come across online are full fledge invent...

mysql trigger in administrator tools

I am using MySQL 5.1 Community Server. I have installed MySQL Administrator 1.2.12. The GUI Front-end is not showing anything to create and work with triggers. Why? ...

Enabling archive engine

How do I enable archive storage engine in MySQL? ...

How to calculate interval between datetime in MySQL?

For example,how to calculate the interval between these two datetime: 2009-09-18 00:00:00 2009-10-17 00:00:00 EDIT I mean to get the interval in the format of year-month-day hour:min:seconds ...

MySql 'Order by Date' Question

Im pulling data from a MySql data table. I'm pulling from a row called 'PubDate' (meaning Published date). This format is in Date format, not DateTime. When I execute the query Select * from Articles order by pubDate ASC Its ordered by date as so: 1.09/18/09 2.09/18/09 3.09/19/09 4.09/20/09 If possible I would like to be able to...

How to resolve the idlewait time in tomcat ?

Hi, I have connection pooling error.Please help me out. Currently working properly..but after long idle time getting error. url="jdbc:mysql://localhost:3306/test?autoReconnect=true"/> ...

How to set and enable new php content by date in php?

I would like to set 5 new content items for monday through friday, but don't want to have to enable them each day. Would it be best to set a timestamp in a mysql field, then something like this. Set up a crontab with php that runs if timestamp is equal to today set "on" to 1. What date/time format would be best, also if I put dates 0...

Need help installing MySQL for Python

Trying to install MySQL for Python. Two problems: 1) Instructions over the net says installation is python setup.py For me, it results with can't open file 'setup.py': [Errno 2] No such file or directory 2) README.txt says: The Z MySQL database adapter uses the MySQLdb package.This must be installed before you can use the Z MySQL DA. Y...

Turning threaded, reverse chrono Drupal story comments into Reddit-style comments

I have a Drupal site that currently displays comments in threaded, reverse chronological order. I am trying to change it to work like Reddit/Hacker News, where the threads and comments within each thread are instead ordered by their current score, based on a voting system I've added. I've found the query used to render the comments rig...

Select Earliest Date and Time from List of Distinct User Sessions

I have a table of user access sessions which records website visitor activity: accessid, userid, date, time, url I'm trying to retrieve all distinct sessions for userid 1234, as well as the earliest date and time for each of those distinct sessions. SELECT DISTINCT accessid, date, time FROM accesslog WHERE userid = '1234' G...

PHP trim row results?

Hello I'm getting results in format location1 2 4 location2 3 2 location3 0 0 location1 1 0 How can I trim results so that row returning 0 and 0 is not displayed ? thank you ................. Here is Mysql query, I don't know how to trim it from MySQL so I thought using PHP .. SELECT hotelas.name, hotelas.address, hotelas.cit...

How do I check if the same tag was already in database with PHP and Mysql?

I want this script to check to see if the same word has been entered if so it should add it to the count not add a duplicate tag. And if the tag entered is a new tag then let it add it to the database. Can some one help me fix this? $tag = mysql_real_escape_string($_POST['tag']); $query = "INSERT INTO tags (tag, count) VALUES ('$tag',...

How do I stop a PHP form from adding blank info to the MYSQL database when page is refreshed ?

If needed I will place the code I just wanted to know what code will I need and where do I place it to stop a form that has empty fields from being entered into the database. A code snippet would be appreciated. This question may be too vague let me know. I'm using PHP and mysql. ...

mysql_ping() c api fails

connection to mysql is getting lost after 8 hours ( i.e afer wait_timeout varibale times out). i am trying to use mysql_ping() to reconnect to the server but ping gives me Mysql server gone away error. I am using sql version 5.1. so i am not using mysql_options() to enable the reconnect flag as mysql_real_connect() sets it to 0. I am exp...

Hibernate: Create Mysql InnoDB tables instead of MyISAM

How can I get Hibernate (using JPA) to create MySQL InnoDB tables (instead of MyISAM)? I have found solutions that will work when using Hibernate to generate an SQL file to create the tables, but nothing that works "on the fly". ...

How to dump a database using mysql (no mysqldump on server)

I need to dump a database from a shared hosting that somehow doesn't have mysqldump installed. In fact, I only have mysql and mysqladmin available from the whole set of MySQL utilities. Is it doable or I'll need to resort to installing something like phpMyAdmin? ...

Where cab I find a host with stored procedures

Hi I have created a project that uses mysql stored procedures and views. I have a lot of difficulties to find a hosting service that would support them. Do you know where I can go? thank you. ...