10,946 Topics

Member Avatar for
Member Avatar for xapher19

Ok, I'm really really stuck with this. I've tried everything to my knowledge to fix it, but I just can't. So please, can anyone here help me with this error: [CODE]Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'host-ip' (4) in /home/ashley/public_html/pw/inc/config.php on line 7[/CODE] This is my PHP: …

Member Avatar for xapher19
0
582
Member Avatar for mrhankey

hi, i have a site which i want to generate a weekly report of activity from. the monthly report should be fine as i could set the query to format the date into month and where "date" is NOW() however how can i generate a weekly report in mysql? any …

Member Avatar for mrhankey
0
5K
Member Avatar for AdriftUniform

Hi, I am using a prototype PayPal payment system which does not ever need to properly work, but I am having trouble writing to the database as well as redirecting to the PayPal payment page at the same time. Here is the form: [code=php] echo '<form name="purchase" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">'; …

Member Avatar for AdriftUniform
0
229
Member Avatar for Vai

I am trying to write or find scripts that will: 1- create a script that will allow someone to Unsubscribe to a mailing list based on email address. 2- export data to a predefined excel file which will be used to print mail labels. I have looked and looked and …

Member Avatar for sumitgupta225
0
447
Member Avatar for newbiecoder

Hello I asked a similar question a few posts before but not the same, so I started this thread. I am trying to add a user to MySql which I installed via XAMPP. I found this command: [CODE]CREATE USER 'root'@'localhost' IDENTIFIED BY 'mysqlpass';[/CODE] But I don't know where to put …

Member Avatar for pixelsoul
-1
203
Member Avatar for anita_86

Hi!The code I use for getting the values from dynamic javascript form fields is not working dont know why? The problem might actually be because of form tags and submit buttons, I guess.So now I have three sets of pages using same code, #1.Working in excellent condition #2.Partially working if …

Member Avatar for anita_86
0
103
Member Avatar for sid78669

I needed to fetch the points for a Building at a certain level. For this, I created a Stored procedure in MySQL Workbench 5.2 CE as following: [CODE=MYSQL] CREATE DEFINER=`tribalwars`@`%` PROCEDURE `GetPoints`(IN BuildingID INT, IN BuildingLevel INT, OUT Pts INT) BEGIN Select Points INTO Pts From Points Where BID = …

Member Avatar for smantscheff
0
193
Member Avatar for lashatt2

how to get from table only one column and its downstair data? from this: [URL="http://lashatt.comoj.com/table1.JPG"]http://lashatt.comoj.com/table1.JPG[/URL] show only this: [URL="http://lashatt.comoj.com/table2.JPG"]http://lashatt.comoj.com/table2.JPG[/URL] what will be mysql code of this?

Member Avatar for smantscheff
0
115
Member Avatar for Shodow

invalid use of property [CODE] Dim search As String search = Trim(txtSearch.Text) Select Case cmbSearch Case "By: Customer Name": Call DataGrid("select * from list1 where CustomerName like '" & search & "%'") Case "By: Date": Call DataGrid("select * from list1 where Date like '" & search & "%'") Case "By: …

Member Avatar for AndreRet
0
222
Member Avatar for Th3nutz

i have de following code [CODE] <?php require_once('Connections/conn.php'); ?> <?php $oras = $_POST['oras']; $zona = $_POST['zona']; $camere = $_POST['camere']; $tip_apartament = $_POST['tip_apartament']; $chirie = $_POST['chirie']; $tableName="anunturi"; $targetpage = "afiseaza.php"; $limit = 2; $query = "SELECT COUNT(*) as num FROM $tableName WHERE oras='$oras'"; $total_pages = mysql_fetch_array(mysql_query($query)); $total_pages = $total_pages[num]; $stages = …

0
95
Member Avatar for lamba89

Hello, I have a problem using the MySQLdb library. I'm trying to insert values into my table but MySQL isn't showing them. What's more strange is the primary key is changing when I manually insert values using command prompt. Here's an example: [CODE] '786', '2011-02-16 14:52:38', NULL '787', '2011-02-16 14:52:52', …

Member Avatar for slate
0
173
Member Avatar for anXieTy

Hi there, i am desperately trying to compile the MySQL++ library header & cpp files in order to create the actual lib. I do follow the exact instructions given in the ReadMe for MinGW. [ICODE]Prerequisite: MySQL C API DLL Import Library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Before you can build MySQL++ with MinGW, you …

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for uopdom

Hi, I'm a database novice and need a few pointers (please). I've created two tables in MySQL: [CODE]CREATE TABLE `Users` ( `Username` VARCHAR( 20 ) NOT NULL , `Password` VARCHAR( 18 ) NOT NULL , `Secret_Question` VARCHAR( 100 ) NOT NULL , `Secret_Answer` VARCHAR( 100 ) NOT NULL, `First_name` Varchar( …

Member Avatar for griswolf
0
105
Member Avatar for ptara1

I have a script that calls up a picture stored in a database. I then have a script that displays said picture on another page. If there is no picture in the database I would like for their to be a no picture icon displayed. New to php but I …

Member Avatar for ptara1
0
2K
Member Avatar for baziili

I tried to import a table intro a database and MySQL give me the next error message: "[COLOR="Red"]MySQL said: #1064 - 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 ''table_ro2' INSERT INTO 'table_ro2' …

Member Avatar for mwasif
0
303
Member Avatar for codeblock

Hi all, i have a problem in writing a block of SQL code in mysql. The block of code will have too delete a single row/record from about 23 related tables all at once. The code that i have written so far will only delete 1 row/record in 10 related …

Member Avatar for codeblock
0
138
Member Avatar for manju11

hello, I am new in perl..i am just trying to connect perl with mysql database. for this i installed xampp server in my system..and now perl,apache and mysql are running on my system. i also check server by running cgi program on it.. evrything is right.but i dont know why …

Member Avatar for mitchems
0
231
Member Avatar for newbie14

Dear All, I have a server with 16 cpus and 32g ram. The problem below when I run my top it show mysql %cpu is more than 100%. Below is my top results. The problem here I would like to why is mysqld is using up 137.2% of the cpu …

Member Avatar for smantscheff
0
154
Member Avatar for codeblock

Hi all, i have a problem in writing a block of SQL code in mysql. The block of code will have too delete a single row/record from about 23 related tables all at once. The code that i have written so far will only delete 1 row/record in 10 related …

Member Avatar for codeblock
0
138
Member Avatar for arv3

Hello. I'm working with a webpage where its going to a Google Store Locator. [URL="http://code.google.com/intl/no-NO/apis/maps/articles/phpsqlsearch.html"]Goolge Store Locator guide[/URL] I did follow. I got it working for a while, but here in Norway we have some characters, ÆØÅ that we use. This is the problem. When I search for a place, …

Member Avatar for smantscheff
0
243
Member Avatar for aakashjeyapal

Hi... I need to establish a connectivity for mysql in c++ on a linux fedora 12.0. please let me know a solution.

Member Avatar for jonsca
0
48
Member Avatar for shahramjaved

Please Explain me what is difference between cluster and non-cluster index. Also if i create a primary key on a Table which index will be created automatically, cluster or non cluster. Thanks in advance.

Member Avatar for best_developer
0
474
Member Avatar for andrewliu

Hello. I have gone through various checks, and I can't seem to figure this one out... [CODE]while($row_sizes = mysql_fetch_array($sql_sizes)); { $sizes = $row_sizes['size']; $product_list .= count($sizes); $product_list .= "<li>".$sizes."</li>"; }[/CODE] Its not outputting any sizes. However, my count($sizes) outputs 0. And that shouldn't because I have [CODE] $sql_colors = mysql_query("SELECT …

Member Avatar for andrewliu
0
113
Member Avatar for feoperro

Hi, I am trying to create a foreign key between 2 tables. I am using MySQL Workbench but every time I create the foreign key relationship, it just dissappears after clicking "apply"... Initially I thought it was Workbench so I tried the legacy Query Browser - but it does the …

Member Avatar for smantscheff
0
171
Member Avatar for rmh000

I'm trying to insert into MySql, using DBI/Perl... What I'm doing is storing all my Print statements into an array, then dumping them out to print, and inserting into a MySql table in a foreach loop... Print resolves ok, but the MySql inserts are being split into fields at the …

Member Avatar for d5e5
0
272
Member Avatar for emulman

Hello! i have a very simple query: [CODE]SELECT * FROM fornitori ORDER BY ragSociale[/CODE] this works perfectly in localhost on my PC (windows 7 pro-apache 2.2.17-mysql 5.1.54-PHP 5.3.4) but on my VPS doesn't work and it give me a query error without number or error description (VPS: centOS 5.5-apache 2.2.16-mysql …

Member Avatar for emulman
0
204
Member Avatar for freakunleash

Hi All, I'm very new to PHP and MYSQL and I'm having hard time trying to insert data from PHP form in MYSQL DB. I'm able to echo out the output on webpage but i'm not able to figure out how to insert the data in DB. Please help me …

Member Avatar for freakunleash
0
215
Member Avatar for agriz

Hi, There are three tables involved here. A kind of quiz localhost site, i did for me. Table 1 contains questions. ========================== question_id (autoincrement) questions (varchar 250) category_id Table 2 contains choices ======================== Choice_id (autoincrement) Choice_value (varchar) question_id Table 3 contains answers ======================== question_id choice_id I am displaying 10 questions …

Member Avatar for smantscheff
0
314
Member Avatar for coervivekmca

i need to develop a search query for city portal ..select * from ....takes lot for time is there any good query to get fast retrieval form database??????? plz reply its urgent

Member Avatar for mwasif
0
98
Member Avatar for anita_86

Hi again!!I wanted to know that is it possible to backup the mysql database just by running query?I am trying to find out the code so that if a user clicks backup button, the whole database will be stored somewhere.

Member Avatar for smantscheff
0
72
Member Avatar for ptara1

I'm trying to display a picture stored in a msyql database. I have the following script, picscript.php, to call the picture from the database: [CODE] <?php $username = ''; $password = ''; $host = ''; $database = ''; mysql_connect($host, $username, $password) or die("Can not connect to database: ".mysql_error()); mysql_select_db($database) or …

Member Avatar for ptara1
0
115
Member Avatar for alafift

[B]Can somebody help me to retreive one or more checkbox values from the database using php and MySQL? Thanks and I appreciate that.:)[/B] In checkbox.html file the checkbox as follow: [CODE] <form method="post" action="Process.php"> <fieldset> <legend>Choose feature(s) to search for apartment</legend> <table border="0"> <tr> <td><input type="checkbox" name="feature[]" value="walkincloset">Walk in closet</td> …

Member Avatar for sudeepjd
0
6K
Member Avatar for jrotunda85

I am creating a login script and I need to check that the username and e-mail don't current exist in the database otherwise it will print an error. I've tried the following but it's not working: [CODE=php]//Create Username Array $SQL = "SELECT Username from user" $Result = mysql_query($SQL); $Array = …

Member Avatar for Javvy
0
270
Member Avatar for ptara1

I'm a php noob and I have a feeling that there is a simple solution to my question. I have a php mysql table search that returns a result sucessfully. What I would like to be able to do is select one of the results to be inserted into a …

Member Avatar for ptara1
0
180
Member Avatar for mrhankey

hi, i have found a few ways on the internet to import an excel sheet into mysql. one of which is save to a csv and upload to a site which creates the sql statements and this is great and i have used in past. however my problem is i …

Member Avatar for mrhankey
0
157
Member Avatar for uopdom

Hi, I've been racking my brain for the last few days to figure out what is wrong with my PHP coding. I've managed to get the default value from my combo box into my database, but when I change the option it is breaking on me. I have reduced my …

Member Avatar for uopdom
0
834
Member Avatar for AntiNL

Hi, I've been busy writing a script to upload photo's to my webserver, and after a lot of searching I finally managed to get the permissions correct, but now I'm having another problem. There are quite a lot of posts about it, but they all come down to having the …

Member Avatar for smantscheff
0
259
Member Avatar for carebear23

Hi I am having trouble trying to normalise my tables, I would really appreciate some help! So far I have: [B][U]Customer Table[/U][/B] CustId(pk) Cust Name Cust Address Cust Postcode Cust Email [B][U]Order Table [/U][/B] OrderID (pk) Order Date_Time CustID(fk) [B][U]OrderDetails[/U][/B] DetailsID(pk) Quantity OrderNo(fk) DeliveryID(fk) [B][U]Product[/U][/B] ProductID(pk) ProductType ProductDescription DetailsID(fk) PartID(fk) …

Member Avatar for Web Dev Rob
0
124
Member Avatar for ruchit

<?php $connect=mysql_connect("localhost","root","") or die(mysql_error()."Cannot find Database"); mysql_select_db("cubicle",$connect); $insert_query='insert into registry(username,password,firstname,lastname,eid) values ("'.$_POST['uname']'","'.$_POST['pass']'","'.$_POST['fname']'","'.$_POST['lname']'","'.$_POST['email']'")'; mysql_query($insert_query); ?>

Member Avatar for pritaeas
0
76
Member Avatar for webteam

Hi, I'm putting an autocomplete textbox on my website to help users type in a location. I want users to be able to type a city or just a state (ex. Seattle, WA or Washington) kind of like what you see on Indeed ([url]http://www.indeed.com[/url]). How do I get the states …

Member Avatar for jlego
0
428
Member Avatar for terabyte

I haven't used MySQL for a long time and I forgot a lot, I'm developing a script that saves a list of URL's but I have a lot of doubts.. should I use varchar or text? (what is the difference) Which characters should I escape? what should be the length? …

Member Avatar for smantscheff
0
113
Member Avatar for VanHackman

Hello, I need some help. I have a MySql DB, and some fields have Japanese values. DB collate is set to: utf8_general_ci When I check for a specific register with PhpMyAdmin, values with japanese characters display ok, but when I try to get the same register to show it using …

Member Avatar for smantscheff
0
2K
Member Avatar for Brianbc

[CODE]<?php /* +-----------------+------------------------------------------------------------+ | Class | setup | | Author | Brian Onang'o | | Version | 1.0 | | Last Modified | 10:16 AM 10/2/2010 GMT+3 | +-----------------+------------------------------------------------------------+ | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU …

Member Avatar for Brianbc
0
239
Member Avatar for Zolcos

This is on my Gentoo box. Recently, a MySQL upgrade seems to have broken my UDFs, specifically those in lib_mysqludf_preg. I first noticed errors like: FUNCTION tablename.PREG_RLIKE does not exist I figured, OK, I must have to reinstall them. I try the config command for lib_mysqludf_preg and get this: ERROR …

Member Avatar for smantscheff
0
748
Member Avatar for ptara1

I'm trying to search a mysql table column for a number. However when I enter a number into the search form I get told that no query has been entered. Here is my code. Database connection information left out on purpose. [CODE] <?php if(isset($_POST['submit'])){ if(isset($_GET['go'])){ if(preg_match("/^[ a-zA-Z]+/", $_POST['search'])){ $search=$_POST['search']; $db=mysql_connect …

Member Avatar for smantscheff
0
79
Member Avatar for TheIdiot

I am wanting to create an online attendance sheet that would allow users to log on and use check boxes or option buttons for twelve weeks corresponding to wk1, wk2, wk3, etc... I have no problem retrieving the members of the group (records from db) but do not know how …

Member Avatar for shdwmage
0
128
Member Avatar for rajeesh_rsn

Hi Friends , I got a row in my table like follows date | Name | id -------------------------- 22-August | Ram | 15 14-July | Krish | 17 14_March | Anwar | 145 --------------------------- I want to sort this with date ie, 14-March 14-Jusy 22-August Using both date and month …

Member Avatar for d5e5
0
114
Member Avatar for Acute

I have a column "etype" which stores enum('r', 'p'). So with each selection I want to extend the row number until the number of etype->'p' will reach some number, for instance 10. If I use LIMIT 10, the total number of rows will be 10, but there is no guarantee …

Member Avatar for smantscheff
0
119
Member Avatar for Masks.be

Hi folks, I have used my connection for all my scripts, but when I am trying to INSERT the BIRTHDATE of a register user scripts i get the ERROR below: [CODE]Check for mysql_real_escape_string() support. if (function_exists('mysql_real_escape_string')) {global $dbc; // Need the connection. $data = mysql_real_escape_string (trim($date), $dbc); } else { …

Member Avatar for sudeepjd
0
61
Member Avatar for ditty

Hi i have a news table. I am using the query "select * from news_table where news_id in(8,3,6,1)". This query is working properly. But the problem is i need to return the rows in the same order what we give in the 'in' clause. ie, first record with news_id 8 …

Member Avatar for mahavir123
0
90

The End.