10,946 Topics

Member Avatar for
Member Avatar for DJSAN10

I don't need the exact query , just the logic of how I should go about it: I need to compare for equality all records of a table for a given set of fields. If count of such similar records exceeds a particular value, I have to delete all those …

Member Avatar for DJSAN10
0
98
Member Avatar for AdriftUniform

Hi, I am trying to get a php variable into a header, I have managed it in another file but it not having it this time and I do not know why. Here is my php code [code=php] <?php header("Location: photo.php?albumid=".urlencode($albumid)); include_once 'title.php'; $result = mysql_query("SELECT id FROM user WHERE …

Member Avatar for LastMitch
0
672
Member Avatar for MWEB

Hallo! I would like to create a script to search a MySQL table (data). The table has two columns (ID & PRICE). Search must be done by ID and Price has to be displayed in the page, any ideas? Thanks in advance! PS: I've tried to modify [this script](http://www.phpjabbers.com/index.php?controller=FrontFrees&action=details&seo_url=mysql-table-search&page=4) but …

Member Avatar for MWEB
0
218
Member Avatar for ktsangop

Hello everyone! I am building a mfc dialog based application in visual c++ 6 and using mysql c api to connect to a database. What i need is a simple type of data grid to show mysql query results in a dialog. I do not need to edit, update, save …

Member Avatar for ktsangop
0
1K
Member Avatar for GregoryHouseMD

The MySQL database I want to use is using SSH tunneling and the MySQL connector provided from MySQL only allows normal connection. Can I somehow work around the SSH tunneling so I can connect Visual Studio with the database? Thank you :)

Member Avatar for ammonsutherland
0
171
Member Avatar for breakid

Hi I have 2 Tables: CREATE TABLE IF NOT EXISTS `questions` ( `question_id` int(11) NOT NULL AUTO_INCREMENT, `createddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updateddate` timestamp NULL DEFAULT NULL, `active_flag` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`question_id`), UNIQUE KEY `id_UNIQUE` (`question_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE `alarts` …

Member Avatar for ammonsutherland
0
263
Member Avatar for javedshaikm

I have a similar mysql database both onine and in offline, with a few common tables in them. How can I synchronize both the databases to make sure the 'similar tables' in offline & online databases have the same data. How can I do this with phpmyadmin.

Member Avatar for ammonsutherland
0
220
Member Avatar for Olyboy16
Member Avatar for nagar.gaurav

Please let me know the detailed procedure to install Apache, MySQL, PHP and PHPmyAdmin on my system which is windows 7. or post a link where the complete installation is given. I do not need to work on XAMPP or WAMP or such kind of other softwares. you can also …

Member Avatar for diafol
0
623
Member Avatar for jacob21

Hi, I am using below PHP script for insertion in mysql table from CSV file. Below code is working fine but i am trying to leave first row of CSV as it contains heading for data. need suggestions as it is reading from very first row. <?php //connect to the …

Member Avatar for leviathan185
0
2K
Member Avatar for asif49

try { mysql_query("INSERT xyz"); mysql_query("INSERT xyz"); mysql_query("INSERT xyz"); commit() } catch (Exception $e) { rollback() } I would like so that if any of the queries within the try { } fails, to go to the exception and rollback the transaction, and commit otherwise. What kind of things will it …

Member Avatar for LastMitch
0
934
Member Avatar for dancks

error: 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 '' at line 1 Its valid sql I checked I just don't understand what would cause that error. I also tried different statements and …

Member Avatar for radow
0
376
Member Avatar for romiaujla

Hi everyone, Here I have a php code, and i want to understand one part of it - like what is actually going on over there. (Based on Model View Controller(MVC) format) This is my 'model/category_db.php' - file It connects to the database and has some functions that have a …

Member Avatar for urtrivedi
0
209
Member Avatar for grantcharov

Okay, I am a total newbie stuck with the following task. I have one table, that looks like this: | id | name | rating | date | ------------------------------ What I am trying to do is gettin an output showing which 'name' has the best 'rating' based on months, showing …

Member Avatar for grantcharov
0
229
Member Avatar for pavitrakannan

# whenevr i execute ne "select *"for any database the error belo is shown,is there any setting in phpadmin....coz this problem occured 1 fine day.....pls help. # <html> <head></head> <body><html> <head> </head> <body> <?php $con = mysql_connect("localhost"); if (!$con){ die("Can not connect: " . mysql_error()); } mysql_select_db("snippets",$con); if(isset($_POST['update'])){ $UpdateQuery = …

Member Avatar for Will Gresham
0
136
Member Avatar for dancks

code: I am trying to debug the code, I can't understand why (or how) the same error is being thrown despite the if statements, dies, and different mysql_queries. I don't get it. <?php session_start(); $_SESSION['msg'] = ""; $con = mysql_connect('localhost','me','omglol'); if(!$con) { die("The connection to mysql server is not being …

Member Avatar for LastMitch
0
112
Member Avatar for PF2G

Hi, I'm developing an APP for android which requires a database, i'm using mySQL, but haven't had any luck with it's connection, this is my code: connection class: public class MySQLConnect extends Activity{ public void onCreate(Bundle savedInstanceState) { } public static void connection(String[] args ) throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection con=(Connection) …

Member Avatar for peter_budo
0
461
Member Avatar for NinjaMediaD

I forgot the way to write a query where you can psuedo name a table, for instance I have a table named user but I have to access it twice in one query and I want the results to be different. something like select user(a).f_name, user(a).l_name, user(b).f_name, user(b).l_name from user(a), …

Member Avatar for NinjaMediaD
0
203
Member Avatar for saadi06

Hi, I have a question that can we use a mysql query in Concat clause. I want to make a query like this SELECT CONCAT(AVG(value),'-',(select Count(UserId) as counts from user_details )) as `Average` from surveyuseranswer Now I want to count number of users and concat it with the average value. …

Member Avatar for dcdruck
0
133
Member Avatar for Shodow

how to do this right Select DATE_FORMAT(EventDate, '%b %d, %Y') from details Order by STR_TO_DATE(EventDate, '%d-%m-%y') Oct 24, 2012 Oct 27, 2012 Oct 28, 2012 Oct 20, 2012 Dec 22, 2012 Jan 11, 2013 Jan 19, 2013 Nov 24, 2012 Dec 29, 2012

Member Avatar for dcdruck
0
144
Member Avatar for Shodow

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a1039476/public_html/getdetails.php on line 69 help <form action="getdetails.php" method="post"> Search Within: <select name="searchtype"> <option value="CustomerID">Customer ID</option> <option value="CustomerName">Customer Name</option> </select> Search Record: <input name="searchterm" type=”"text" size="20"/> <input type="submit" name="submit" value="Search"/> </form> <?PHP echo "<title> *********** </title>"; $searchtype=$_POST['searchtype']; $searchterm=trim($_POST['searchterm']); if …

Member Avatar for pritaeas
0
253
Member Avatar for mystycs

Below i made a MySQL Table in my phpmyadmin. [Click Here for a screenshot of my phpmyadmin table](http://i.stack.imgur.com/7gl77.jpg) I want to print on my php page the cat_name of a cat_id of my choosing. What code would i use exactly for that? I am looking at this guide here But …

Member Avatar for diafol
0
193
Member Avatar for Shodow

onload mysql 'query' will be executed then if the visitor will hit search the mysql 'querysearch' will be executed how to do that? <form action="default.php" method="post"> Search Within: <select name="searchtype"> <option value="CustomerID">Customer ID</option> <option value="CustomerName">Customer Name</option> </select> Search Record: <input name="searchterm" type=”"text" size="20"/> <input type="submit" name="submit" value="Search"/> </form> $searchtype=$_POST['searchtype']; $searchterm=trim($_POST['searchterm']); …

Member Avatar for LastMitch
0
216
Member Avatar for karlcunanan

Hello PHP geniuses! I am a beginner in php and would like to seek your expert advices and knowledge. When I display the result to a table, it always loop at the bottom, I want to display the another table at the right side of the first table. When I …

Member Avatar for LastMitch
0
206
Member Avatar for AndreRet

I need to add an image (saved path in mysql - image from file on server returned from $image_id) to my page according to 4 rows returned. There will always be 4 rows returned from db. My problem is that it shows the same image (main with 3 thumbnails) in …

Member Avatar for AndreRet
0
233
Member Avatar for havish999

I have a table attendance which contains id(int), attendance(char), and date(date datatype) columns. Values get stored in this table through a php file. In the below code I have given two textbox for the user to select date range. eg. from 2012-10-15 to 2012-10-17.. when the user selects date range …

Member Avatar for havish999
0
257
Member Avatar for Mikesmusings

Hi! I have a contact form that won't...do anything!! I'm kinda new at this, although I've been succseful on MS SQL for YEARS...Can some one shed light on this? Thanx in advance!: The HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> …

Member Avatar for Mikesmusings
0
382
Member Avatar for vestervang

I'm trying to make my first gallery with PHP and I'm having some problems i can't solve. My code looks like this: <?php include_once('config.php'); //Script der uploader og omdøber billeder if(isset($_FILES['billede'])){ $errors = array(); $allowed_ext = array('jpg','jpeg','gif','png', 'bmp'); $file_navn = $_FILES['billede']['name']; $file_ext = strtolower(end(explode('.', $file_navn))); $file_tmp = $_FILES['billede']['tmp_name']; $file_size = …

Member Avatar for vestervang
0
277
Member Avatar for rayidi

I want to store my array into my database using jQuery. Here is my code i'm using serialize(); function. Its storing correctly but when i unserialize(); nothing happening. Please help here is my code. <script> $(document).ready(function(){ $("#save-skills").click(function(){ var skills = $('input[name="skills[]"]').serialize(); console.log(skills); $('#loading').css('display', 'block'); var queryString = "skills=" + skills …

Member Avatar for diafol
0
216
Member Avatar for branding4you

Ok so now I am stuck, I looked at the http://www.daniweb.com/web-development/php/threads/326436/php-read-text-file-and-save-into-databse page and understand some of it, Yet it is not what i require, substring does not count like I thought it would, like the left, right mid commands in excel. I want to count to the data I want …

Member Avatar for branding4you
0
785
Member Avatar for mikeandike22

I have seen a couple solutions to this problem but none have worked so far. here is the error. [B]Fatal error[/B]: Call to undefined function mysql_connect() in [B]C:\wamp\www\login.php[/B] on line [B]12 [/B]and the code [PHP]<?php // connect to the mysql server $link = mysql_connect(localhost, root, admin) or die ("Could not …

Member Avatar for ashishanand
0
4K
Member Avatar for Yorkiebar14

Hello, I am making a website to do with different tests so I need a script which can unlock test 2 after test 1 is completed. Then the same for 3, then 4 etc etc. I tried using MySQL to increase an INT so I could tell what the latest …

Member Avatar for Yorkiebar14
1
304
Member Avatar for SaaDwTk

How do I do that using SQL queries? I need a code to do that: For every "Name" on "names" column on DataBase, do this: { name: 'NameX', data: [Value from name X] } I need a code to display in categories, all names that theres in the "names" column …

Member Avatar for pritaeas
0
77
Member Avatar for maki.tabasa

i have this main_login.php code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form name="form1" method="post" action="checklogin.php"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Member Login </strong></td> </tr> <tr> <td …

Member Avatar for Will Gresham
0
260
Member Avatar for Arjun_Sarankulu

I have a crontab job in which data from csv file get insert into mysql table at regular interval. Now i want the same table data to be inserted in ms sqlserver database. I know i can write code again to take data from csv to ms sqlserver database. But …

Member Avatar for rayidi
0
148
Member Avatar for davy_yg

Hello, I am trying to migrate sql file from one computer to another computer. And while trying to import the sql file these error appears why is it? I am trying to migrate sql from Joomla. Pencarian SQL: -- -------------------------------------------------------- -- -- Table structure for table `nafqc_usergroups` -- CREATE TABLE …

Member Avatar for davy_yg
0
290
Member Avatar for Shodow

Is this possible? Insert Into Customer(CustomerID, CustomerName) Values('6','test') on DUPLICATE key Update CustomerID='Select Max(customerID)+1 from Customer'

Member Avatar for adam_k
0
54
Member Avatar for PeteB247

Hi, I am currently undertaking an assignment for university. I've having quite a bit of trouble with this seemingly simple task, which is to import the data from 2 .txt files into 2 tables within an sql database via python. Here is what I've done so far. This subject is …

Member Avatar for woooee
0
2K
Member Avatar for ratanji

when new row inserting into mysql, then i want to dislplay some popup notification for few seconds in some page. so pls help me anyone ? thanx in advance :)

Member Avatar for rayidi
0
703
Member Avatar for xxy2j

I created a file in php and under this i wrote a code to lock a table with read mode. Below that file i wrote a insert operation into the same table, but as we know that read lock only supports read operation, meaning you can only view what is …

Member Avatar for diafol
0
142
Member Avatar for johnef_sh

hay how is everybody here, I have this form which should sign up users and send email to them to confirm they emails the users sign up OK but the Email don't go at all to the users email see my code and please need help on this. <?php if(isset($_POST['submited'])) …

Member Avatar for johnef_sh
0
254
Member Avatar for jordo76

hi guys i keep getting this error message 1046 - No database selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration DATABASE_TEP_DB_ERROR and also at the end of the insulation i get this message any help please its doing my head in Warning: mysql_num_rows(): supplied argument is not a …

Member Avatar for LastMitch
0
282
Member Avatar for ismael ahm@d

i have three db tables products product_id- Name 1 | hairoil 2 | lotion 3 | cream Countries country_id- Name 1 | UAE 2 | France 3 | UK Now i wanna that when select multiple countries for one product from Html form, then in third db table should insert …

Member Avatar for ismael ahm@d
0
9K
Member Avatar for HunainHafeez

guys, i developed Students alumni project,in php + mysql where students registers and check their online status and view his academic records, i completed evaluated my project on local host, WAMP(apache), and my project worked fine, all db connection, data access everthing is fine on local host but on Online …

Member Avatar for HunainHafeez
0
214
Member Avatar for nit8899

I am getting this error "Fatal error: Call to undefined function mysql_connect() in /var/www/html/test1.php on line 8" for the following code: <?php $host = "localhost"; $user = "user12"; $pass = "34klq*"; ini_set ('display_errors', 1); $r = mysql_connect($host, $user, $pass); if (!$r) { echo "Could not connect to server\n"; trigger_error(mysql_error(), E_USER_ERROR); …

Member Avatar for nit8899
0
1K
Member Avatar for ajay.motah

hi all, i am actually working on a project. But the mysql_real_escape_string() is not working on my php5 codes. Can anyone suggest me an alternative to avoid sql injection, plz! Thank you!

Member Avatar for iamthwee
0
114
Member Avatar for mionazraelmiranda

How can I avoid negative numbers from being inserted in my database table? i have a code that works but will not prompt until the value itself in the table is below 0. $nega = mysql_query ("SELECT * from `bgl` where product_code = '$product_code' and stock > 0"); $row = …

Member Avatar for mionazraelmiranda
0
239
Member Avatar for edsweng

Is it possible to embed variable in longtext data field? **For instance:** the field name is "description" and it contains... The date is $date_var. **In PHP/MySQL Query:** $date_var = date('m/d/Y'); echo $row['description']; **The output should be:** The date is 10/14/2012. please advise.

Member Avatar for edsweng
0
112
Member Avatar for bluecloudburst

I have admins who can login to view employment applications. I'd like to have a column which indicates the application has been reviewed by each specific admins. Session variable is holding the admin's login user_id. Is it possible to use one query to select and display list of applicants, plus …

Member Avatar for bluecloudburst
0
111
Member Avatar for Shodow

how can i change the value of data in crystal report base on the selected item in listview? i am using mysql and visual studio 2012

Member Avatar for Shodow
0
912

The End.