10,942 Topics

Member Avatar for
Member Avatar for calebcook

Hi. I have been working on a project that displays data in an XML file. (It's kind of like an API). I know how to parse XML with PHP, and how to make an XML file in PHP, but they don't work together. :) Basically, I have two files: `parse.php` …

Member Avatar for Incognitus
0
232
Member Avatar for nyt1972

Hi Experts, below is my data file and I want to create form the basis of data returned by the following code. **getdata.php** <?php include ("dbConnect.php"); $examID = $_POST['examID']; $sql= mysql_query("select * from examsub where examID='1'); if(mysql_num_rows($sql)>0) { while($row=mysql_fetch_array($sql3)) { echo $row['examID'].$row['subject'].$row['thrymarks'].$row['pracmarks'].$row['subjectID']; } } ?> Below is the code from …

Member Avatar for dany12
0
161
Member Avatar for sammry

I am using the followng code, to import csv into mysql. if($_POST['sform'] == "1") { $fname = $_FILES['upload']['name']; $chk_ext = explode(".",$fname); if(strtolower($chk_ext[1]) == "csv") { $filename = $_FILES['upload']['tmp_name']; $row = 1; if (($handle = fopen($filename, "r")) !== FALSE) { while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $row++; $data_entries[] …

Member Avatar for sammry
0
125
Member Avatar for Acute

There are two tables - posts and comments: create table posts ( id integer not null primary key auto_increment, body text not null ); create table comments ( id integer not null primary key auto_increment, body text not null, post_id integer not null references posts(id) ); Now I want to …

Member Avatar for smantscheff
0
174
Member Avatar for mbarandao

hello: I'm pulling mysql data and want to load into an array. I getting the data in like manner: $result = mysql_query("SELECT DISTINCT item2 FROM products"); echo "var option_array = new Array(num_of_cats);\n"; $count=1; echo"option_array[0] = new Array(\"Please Select a Merchandise\");"; while($row = mysql_fetch_array($result)) { echo"option_array[".$count."] = new Array(\"--select One--\",\"\",\"\");"; $count++; …

Member Avatar for diafol
0
267
Member Avatar for hassanumair1

kindly send me a vb / .net code for sync 2 mysql databases on localhost. I need only 1 way syncing. Thanks and Regards: Umair-Hassan

0
138
Member Avatar for farkZ

Hi, i got tis trigger CREATE PROCEDURE updateG AFTER INSERT ON gnojidba FOR EACH ROW BEGIN DECLARE box int; SELECT quantity INTO box FROM stock WHERE name = NEW.name; IF (box >= NEW.Qty_value) THEN UPDATE stock SET quantity = (quantity-NEW.Qty_value) WHERE name = NEW.name; ELSE UPDATE 'Error!' SET x=1; END …

Member Avatar for farkZ
0
628
Member Avatar for hwoarang69

i have a upload.php page where user can upload images to database. now i want to create gallery.php. where who ever is loged in can view all his photos from database. here is my struct for my gallery.php file gallery.php ______________________________________ (1)at top there is going to be menu and …

Member Avatar for jeremym001
0
139
Member Avatar for ramganesht

Below is the code in which I am creating the list of URL s with the information of hotels in a city, the problem is when click on the URL no values are being displayed. please let me know how should i modify the code. <?php include ('connectdb.php'); $query = …

Member Avatar for |-|x
0
226
Member Avatar for ramganesht

I am, trying to write a PHP-Mysql code which fetches the important places in a city and displays the results as links, when i click on the city it should display all the details like name, place, address, phone number etc, but in this case results are not being shown. …

Member Avatar for diafol
0
144
Member Avatar for jward50

Hi I am trying to create a stored procedure to list node titles with either a Y or a N if there is a coresponding record in another table, I am very new to stored procedures and am not sure how I get the data out and into a list, …

Member Avatar for pritaeas
0
99
Member Avatar for gopi17

Guys, need some guidance here... i have this php codes that copies all the value in a table to another table....some sort of table replication now, the problem is when i tried copying them, keep getting an error Database down **1054: Unknown column '124928F014007570' in 'where clause'...** the codes dataverification.php …

Member Avatar for pritaeas
0
179
Member Avatar for anand01

hi All, I have two tables table-1:customeramount table-2:customerpurchaseamount table1 have customers bonus amount and table 2 i have customers purchase amount now i need to calculate balance bonus amount i tried with following query but It shows unexpected result , could any one guide me.. SELECT CM.`custid`, SUM(CM.`amount`) - SUM(CP.`Amount`) …

Member Avatar for anand01
0
144
Member Avatar for gopi17

I'm having trouble deleting this file... keep getting this error : Warning: unlink(Gate_pass.csv) [function.unlink]: Permission denied in C:\wamp\www\SVS\copydata.php on line 31 i search trough some sites, they said replace the $myFile with the orginal name Gate_pass.csv, but still getting the same error...can someone guide me on this matter. thank you …

Member Avatar for gopi17
0
139
Member Avatar for eltonpiko

hi i trying to work on a lunch monthly order form.what i want to do is create a table just like a calendar with 30 cells label 1 to 30 days and in each cell the same food item with checkbox next to it generated from mysql. the user put …

Member Avatar for diafol
0
1K
Member Avatar for hwoarang69

les a user come on index.php page. he sees login form. but he forgot his password. so he click forgot password. on forgotpassword.php page he fills a form. <form action = 'forgotpassword.php' method = 'post'> Username: <input type='username' name='username'><br/> E-Mail: <input type='email' name = 'email'><br/> <input type='submit' value='get password'> <a …

Member Avatar for vibhaJ
0
125
Member Avatar for speakon

Hello, I need to create a JDBC that connects to a mySQL database, retrieves the data from a table and displays it into a JTable. I have done this successfully, but have ran into a problem. The initial values I entered into the database (for testing) are permament. If I …

Member Avatar for speakon
0
371
Member Avatar for beforetheyknew

Hi guys, I’ve written an application and I’m trying to utilise a database behind it. I’ve created a mysql database, and table which all appears to work correctly. I appear to have connected to the db correctly too. And hit a bit of a brick wall. As a side-note, within …

Member Avatar for lolafuertes
0
330
Member Avatar for BoB3R

Hello, I want to edit record in mysql and ive got problem with UPDATE command its giving me syntex problem here is the code: <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("dbname", $con); $sql="UPDATE users SET (userid, firstname, lastname, email, username, password, role) …

Member Avatar for BoB3R
0
173
Member Avatar for BoB3R

Hello, I am new in all this and i was hoping you could help me with a little thing so here it is ive got 2 files one is for showing movies from database and there is "delete" button that is taking an a id and deleteing the raw display.php …

Member Avatar for BoB3R
0
118
Member Avatar for mancode1007

Guys, I having problem converting the sql server function to mysql function. It work perfect at sql server now it now working at mysql. Please help.Thanks DELIMITER $$ CREATE Function `pearldb`.`SortingAlphanumeric` ( ColValue NVARCHAR(255) ) RETURNS NVARCHAR(1000) BEGIN DECLARE p1 NVARCHAR(255); DECLARE p2 NVARCHAR(255); DECLARE p3 NVARCHAR(255); DECLARE p4 NVARCHAR(255); …

Member Avatar for poojavb
0
116
Member Avatar for Tenaciousmug

That is my query. I am trying to select the item details for the items the user has in their inventory, but I DO NOT want to select the ones that are in their collection. So I'm trying to say where item_id IS NOT in the user_collection with their user …

Member Avatar for 1stDAN
0
105
Member Avatar for rogerg

Hello, I try to call a header A if a user is logged in, and a header B if a user is not logged in on some pages I haven't managed to do so, I've tried to create a php function, but didn't manage to make it work. Then, I …

Member Avatar for rogerg
0
257
Member Avatar for mitmehta22

i am using MySQL database. i have one field PurchaseDate. i want following result e.g. : PurchaseDate between May-2010 and Aug-2011 pls help me to solve this problem. its urgent. thanks in advance....

Member Avatar for mitmehta22
0
113
Member Avatar for reco21

Hello, I'm trying to get results from a mysql database based on values in an array. My tables look like this 1. id | articles | thumbs | etc 2. tag_id | tag_name | article_id I'd like to get related articles based on the tags for that particular article. So …

Member Avatar for diafol
0
1K
Member Avatar for johndohmen1963

Who can help me with the following. a part of my code doesn't work and i do not know wy. <?php //from here it is working $con = mysql_connect("localhost", "bla", "bla"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("wordpress", $con); $sql1 ="CREATE TABLE IF NOT EXISTS stamboom_landen …

Member Avatar for johndohmen1963
0
1K
Member Avatar for sumanth.boss

When i Connect to Mysql using TURBO C++,im getting error unable to open include file mysql.h mysql_version.h mysql_con.h mysql_time.h i added the include files and set path . even then im getting error . help me :(

Member Avatar for adityatandon
0
373
Member Avatar for shahbaz13

Hi there, I am making a spell checker program with php with words stored in mysql. I use it to check unicode languages. But I do not get good suggestions with similar_text with percentage above 82. But if I decrease this percentage, I get many useless words. How can I …

Member Avatar for shahbaz13
0
510
Member Avatar for dwdata

I have a starting query that displays appointments and I am trying to expand to get different statistics: SELECT apt.user_id, apt.appt_id, apt.client_id, apt.time_start AS stime, FROM_UNIXTIME(apt.time_start,'%Y-%m-%d') AS ftime FROM tl_appt apt LEFT JOIN tl_rooms r on r.room_id = apt.room_id WHERE apt.appt_id IS NOT NULL AND apt.appt_status_id = '3' AND FROM_UNIXTIME(apt.time_start,'%Y-%m-%d') …

Member Avatar for adam_k
0
117
Member Avatar for hassanumair1

Hello! how can i sync or replicate my 2 db's on localhost xampp on windows. I want to replicate themselves as customer order something on my site and i am able to update his order and criteria as aearly as possible and also for security purpose. That if incase any …

Member Avatar for hassanumair1
0
211

The End.