10,940 Topics

Member Avatar for
Member Avatar for nowitzk

Hi, I just started using phpMyAdmin. I need to create a table with all the dates of the year. The date will be the primary key and for each date there will be five time fields. Is there any way to do that with one SQL query? Thanks in advance.

Member Avatar for Shanti C
0
120
Member Avatar for guravharsha

Hi, I have one query. Can we use empty resultset objetct for checking any condition. supose in my query: [B]rs= st.ExecuteQuery("select * from user where userid=1 and eventid =4");[/B] which result in [B]empty resultset [/B]. so can i use [B]rs[/B] for following use as: if(rs==null){ do some operation }else{ do …

0
78
Member Avatar for veledrom

Hi, I get this error on red coloured line. "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\.....". I use PHP 5.25, MySQL 5.51. [code] $sql="SELECT * FROM customer"; $run = mysql_query($sql); [COLOR="Red"] if (mysql_num_rows($run) > 0) {[/COLOR] .... } [/code] When there is record it …

Member Avatar for lordspace
0
162
Member Avatar for netfreehost

On of my database stooped working. [QUOTE] mysql> check table invoice; +-------------------------------+-------+----------+----------------------------------------------------------------------+ | Table | Op | Msg_type | Msg_text | +-------------------------------+-------+----------+----------------------------------------------------------------------+ | billing_db.invoice | check | Error | Incorrect information in file: './billing_db/invoice.frm' | | billing_db.invoice | check | error | Corrupt | +-------------------------------+-------+----------+----------------------------------------------------------------------+ 2 rows in set (0.00 …

0
102
Member Avatar for kevin wood

i have just had to go into the backend of an old site to fix the mysql db as some had deleted the wrong db. i have got most of it working again now but did not know what this line of code is doing. [CODE]$sql = "SELECT id,thumb,image,designer,title,(total/freq) AS …

Member Avatar for kevin wood
0
85
Member Avatar for grr

[code=php] <?php $result = mysql_query("INSERT INTO ".UPREFIX."items` VALUES ( '', '".$item_name."', '".$item_descr."', '".$item_action."', '".$item_rarity."', '".$item_value."', '".$item_folder."', '".$item_image."', '".$item_cat_id."', '".$item_visibility."')"); ?> [/code] I didn't know if this would be php or MySQL. I'm getting returned the following error: You have an error in your SQL syntax; check the manual that corresponds …

Member Avatar for grr
0
95
Member Avatar for DrWhoFan

I've run the install for PHP 5.2.6 and been able to have PHP pages run successfully. My research has told me that PHP no longer includes the dll needed to connect to mySQL. I've run into a couple of problems on my system. [LIST=1] [*]Using phpinfo(), I can identify the …

Member Avatar for DrWhoFan
0
128
Member Avatar for veledrom

Hi, I have "Balance" table that is shown below. Table :Balance todaysDate/openBalance/closeBalance ------------ --------------- -------------- 2008-07-24 250000 100000 Above record will be inserted into next row as it is at 10:00pm. How do i do this? Thanks

Member Avatar for chaosprime
0
122
Member Avatar for kevin wood

have had to move some file across from one server to another and i am now getting access denied for user. it also says it could not connect to the server. i have changed the site path so it is now the address where the files have benn moved across …

Member Avatar for chaosprime
0
153
Member Avatar for scholzr

I am trying to find a way to calculate a running total of a field in my database, and while I have found a lot of good solutions, such as [URL="http://www.daniweb.com/forums/thread127644.html"]http://www.daniweb.com/forums/thread127644.html[/URL], they all require that I have a column which is ordered in the way that I want it to …

Member Avatar for chaosprime
0
314
Member Avatar for rich_m

I am stuck between deciding between MySql and Oracle, The reason being, I want to know how long it will take for MySql to reash the level of the current Oracle, if its gonna take more than a year....I guess Oracle is worth the money else not. Any views on …

Member Avatar for buddylee17
0
186
Member Avatar for abhi_tec

I have a query. Say in a notepad( D:\SQL.txt) I have 100 commands written in it UPDATE sal SET sal= sal+3000 select * from .................. insert into table tab_name values(........) insert into table tab_name values(........) insert into table tab_name values(........) .........so on Is there any SQL query like that if …

Member Avatar for Shanti C
0
114
Member Avatar for jencinas69

Hello I need to get data from a database and write the db dump to a server as txt file any ideas?

Member Avatar for jencinas69
0
108
Member Avatar for blogging23517

I've installed the plugin "WP Security Scan" on a fresh install of Wordpress 2.6 running on a Apache server at hostgator & the plugin says this about my table prefix. Your table prefix should not be wp_. Click here to change it. Change your database table prefix to mitigate zero-day …

0
62
Member Avatar for digital-ether

[B]Please excuse the length of this post:[/B] I'm trying to integrate OpenFire (XMPP Server) with a Joomla (CMS) user database. Openfire allows authentication against an external database by editing its configuration. In the configuration you have to supply the query that will retrieve the password from the external database, given …

0
93
Member Avatar for emiola

Hi, I have noticed that a lot of newbies using MySQL ODBC driver on their Windows often come across difficulties testing the connection despite that they have created the database on their servers. If you can put our members through in step wise fashions, please respond to this tread. It …

Member Avatar for tesuji
0
148
Member Avatar for veledrom

Hi, How can i pick next or prevoius day in mysql? Any function like curdate() ? Thanks

Member Avatar for veledrom
0
114
Member Avatar for veledrom

Hi, [inlinecode]Select closing From balance Where account_no = 12 Limit 1[/inlinecode] returns an error "You can't specify target table 'balance' for update in FROM clause" Where is mistake? Thanks [code] AFTER INSERT ON Close BEGIN Insert into balance (date, opening, account) Values (CURDATE(), (Select closing From balance Where account_no = …

Member Avatar for veledrom
0
68
Member Avatar for TheBeast32

Hi, I have been trying to get MySQL to work on my apache server with PHP on it. My Apache version is 1.3.29 and my PHP version is 5.0.0RC2. I'm also running Windows XP Professional SP2 32 bit. I tried modifying the php.ini file to load the php_mysql.dll, but I …

Member Avatar for emiola
0
112
Member Avatar for DickDeeds

Problem: I have been unable to access encrypted information using ENCODE and DECODE. The information goes into the file OK but I cannot DECODE it. Below is the code.’ 1. The call from the program. [code]$result1=$dba_pm->selectencrypted($id); [/code] 2. the code in the class module [code] $sql="select DECODE('PM_Subject','2TRILFDA9Gioads*%'), DECODE('PM_Memo','2TRILFDA9Gioads*%') from personal_memo …

0
51
Member Avatar for kikunosuke

first, i am sorry if i can't speak english well i have problem where i can't insert data to data base mySQl using vb2005. it is my simple code on vb. ---------------------------------- [code]Imports MySql.Data Imports MySql.Data.MySqlClient Public Class Form1 Dim xobjConnection As New MySqlConnection("Server=localhost;uid=root;pwd=;database=test1;") Dim xobjAdapter As New MySqlDataAdapter() Dim …

Member Avatar for kikunosuke
0
92
Member Avatar for c_shaft05

Before I continue, quick explanation: product table pid (primary key), pdesc (Product discussion), and pquant (quantity of product). I then link it to sub_category which determines if it is where it falls (AKA SODIMM or DIMM). Now, I have duplicate product descriptions (160GB HD, for example.) We have 2.5 inch …

Member Avatar for tesuji
0
86
Member Avatar for veledrom

Hi, Code below is wrong but i can't find the mistake. [code] Set @RecAdj:=(SELECT SUM(Paid) AS Total FROM payment WHERE PayDate = CURDATE()); if ISNULL(@RecAdj) set @RecAdj:= 0; end if; [/code] Or is there any other way? Thanks

Member Avatar for veledrom
0
113
Member Avatar for lydia21

hi, i want to select from more than two table using a single mysql query.please tell me a example query/. thanks in advance

Member Avatar for lydia21
0
113
Member Avatar for Nuxxy

My SQL knowledge is a little rusty. While I can write simple queries, I have a complicated one that is giving me a headache. Any help? I'm using the following tables (only showing the relevant fields)... [B]Test table[/B] - TestID (pk) - TestDesc [B]FAC table[/B] - TestID (fk, Test) - …

Member Avatar for Nuxxy
0
75
Member Avatar for jade_22

Hello, I have a wordpress blog that I'm just testing around. I've chosen "friendly" urls which look like this: [B][url]http://www.self-made.us/2008/06/organization-of-material/[/url][/B] where the link is in this format : /[year]/[month]/[title of post]/ The "normal" link would look like this : [B][url]http://www.self-made.us/?p=4[/url] [/B] where p equals the database primary key of which …

0
60
Member Avatar for ww1aero

My website host supports MySQL and has a simple MySQL “workshop” available in their “V-Deck” (user control panel) to make simple tables for things like subscriber email lists, etc.. [B]My question is, can I use MySQL on my HTML web site, to update item prices on multiple pages at once, …

Member Avatar for ww1aero
0
142
Member Avatar for vibhashin

If You need to login to a MySQL server with a username that is different from the username you use to log in to your operating system. Which command will we use?

Member Avatar for varmadba
0
70
Member Avatar for forzadraco

range of datetime data type (show all records in between 2 dates. example: form 2008/10/01 to 2008./12/12). thanks

Member Avatar for Shanti C
0
135
Member Avatar for fir3lion

Hi, I am a beginner in VB.net. I have some problems here, that is how to transfer data between 2 different mySQL servers using VB.net? Myself have 2 solutions this problem but when i implement it, i face some difficulty. 1st solution is insert the data line by line means …

0
68

The End.