10,932 Topics

Member Avatar for
Member Avatar for papermusic

[CODE] <?php include 'dbc.php'; $query = "SELECT * FROM em.tutor"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "Name :{$row[0]} <br>" . "Subject : {$row[1]} <br>" . "Message : {$row[2]} <br><br>". "Message1 : {$row[3]} <br><br>". "Message2 : {$row[4]} <br><br>". "Message3 : {$row[5]} <br><br>". "Message : {$row[6]} <br><br>". "Message : …

Member Avatar for buddylee17
0
208
Member Avatar for papermusic

test_imagedb_create.php [CODE] <? $dbserver = "localhost"; $dbuser = "root"; $dbpass = ""; $dbname = "em"; $dbconn = @mysql_connect($dbserver,$dbuser,$dbpass) or exit("SERVER Unavailable"); @mysql_select_db($dbname,$dbconn) or exit("DB Unavailable"); $sql = "SELECT image_type,image FROM em.testblob WHERE id =". $_GET["id"]; $result = @mysql_query($sql,$dbconn) or exit("QUERY FAILED!"); $contenttype = @mysql_result($result,0,"imgtype"); $image = @mysql_result($result,0,"imgdata"); header("Content-type: $contenttype"); echo …

Member Avatar for papermusic
0
694
Member Avatar for loligator

Hi all, I want to store the hours of restaurants in a database (sounds simple, right?). I don't want a text field where hours are entered as a lump of data, but was thinking of making a column for each day of the week and filling in the hours this …

Member Avatar for loligator
0
187
Member Avatar for tanha

Hi. Suppose I have a list box, which is filled out from mysql, and I have a text box and a submit button. I want to add the text box data into list box and at the same time I want to have the text box data into mysql as …

Member Avatar for tanha
0
250
Member Avatar for aditi_19

Hi, I have a problem. I am storing projectid (varchar) as a field in this format :- DD-NNN where DD is the last two digits of the year and NNN is the next project number within that year (i.e. 09-500 is the 500th project in year 2009). The user has …

Member Avatar for somedude3488
0
99
Member Avatar for newnetzerouser

I need help on fetching data before inserting. My issue is as follow: My table fields are: serial_start_no - varchar(25) - unique key serial_end_no - varchar(25) - unique key Using JSP user will be allotted the starting number and ending number (i.e. 1. Start number – S001 and End number …

0
50
Member Avatar for rubsay

Hello All. I want to update email in User table from the active directory. For this i am doing the following. 1. Extract all usernames from User table whose emails are not updated SELECT username FROM `mantis_user_table` WHERE email = 'No Email' or email = '' into outfile "C:/temp/test1.txt" 2.Run …

Member Avatar for iamthwee
0
101
Member Avatar for sarithak

Hi frnds... here i am uploading images....i am getting error when i use songle quotes in title(otherwise correct)......plz check this one..[CODE] $gcategory=$_POST['gcategory']; [B]$gname=mysql_real_escape_string($_POST['gname']);[/B] [B]$tmp_name = mysql_real_escape_string($_FILES["gphoto"]["tmp_name"]);[/B] $name = mysql_real_escape_string($_FILES["gphoto"]["name"]); $tname = mysql_real_escape_string($_FILES["tphoto"]["name"]); $ttmp_name = $_FILES["tphoto"]["tmp_name"]; $date=date('y-m-d'); $dir="../../gallery/allgallerys/$gcategory/$gname"; $tdir="../../gallery/allgallerys/$gcategory/$gname/thumb"; if(!file_exists($dir)) mkdir($dir)or die("Filename all ready exits"); if(!file_exists($tdir)) mkdir($tdir)or die("Filename all ready exits"); …

Member Avatar for joe1987
0
142
Member Avatar for barneygurl

I need help!!!!! I would like to know how i can restore my mysql db from one form. I got the backup to work using mysqldymp but when I try to restore the .sql file created, nothing I try works.

Member Avatar for indika75
0
123
Member Avatar for joshfolgado

Hi, We currently use MySQL and need to create a mechanism where we replicate some of our databases in a safe and consistent manner. Lets assume we have a main database which would be replicated onto another database and it is this replicated database the users access for their queries. …

0
40
Member Avatar for joshfolgado

We use poli-morphism with Java classes and I need to duplicate this with a database design... let me explain... Lets assume: - we have customers - customers can either be rich or poor - we want to store different details for rich and poor customers; i.e.for poor customers we may …

0
43
Member Avatar for mvt6204

Hi everyone, I've been a programmer for about 3 years and not so long ago, I decided to switch my interest to web development. For that reason, I've been learning PHP & MySQL for some times. However, I feel a need of direction about what is relevant to the current …

Member Avatar for itisnot_me
0
179
Member Avatar for chrispaul8676

hi there, i would want to change the mysql to mssql. please help [ICODE]<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SQLClient" %> <script language="VB" Runat="server"> Dim blHasRows as Boolean Sub doInsert(Source as Object, E as EventArgs) Dim strConn as string = "server=YourServer;uid=YourUID;pwd=YourPWD;database=YourDB" Dim MySQL as string = "Select * from samples …

Member Avatar for chrispaul8676
0
90
Member Avatar for sfrider0

I'm trying to delete rows from my database by using an HTML form. I can retrieve the database and display it nicely in a table using this code: [code] <table width="889" border="1"> <tr> <td width="206" bgcolor="#999999"><div align="center"><strong>Site</strong></div></td> <td width="549" bgcolor="#999999"><div align="center"><strong>Reason</strong></div></td> <td width="112" bgcolor="#999999"><div align="center"><strong>Date Added</strong></div></td> </tr> <?php $row_count = …

0
99
Member Avatar for ramsri05

Dear Friends. :) I am new to this forum and php coding as well. 1. I would like to know whether we can able to [B]import .xls excel[/B] file contents into the [B]mysql database[/B] table using [COLOR="Red"]php[/COLOR].? Objective: User has to browse the excel file from their system and import …

Member Avatar for chrishea
0
563
Member Avatar for Freedom2

This old fart is attempting to get his aged brain wrapped around this mysql/php stuff. Getting my data from Excel into a Mysql db took some doing, but I got it done. Hooray for me! Now I've been trying to get that data into a page using php. I've managed …

0
46
Member Avatar for SKANK!!!!!

i went to tizags ajax mysql tutorial(how to update mysql with ajax) i dont understand it seems like that example is wayyyyy too long i cant comprehend it it makes no sense. does anyone know of a good way to explain to me how to update / insert a value …

Member Avatar for essential
0
144
Member Avatar for ROTC89

ok so i am trying to make a program that is able to viewed on the web using mysql and php together. i have to show a little icon or something saying would you like to view the listing you submitted. this is my program but i keep getting a …

Member Avatar for ROTC89
0
104
Member Avatar for tbolt

I have a problem selecting unique rows from a table where if two specific columns are the same value as another row. Easier if I lay it out: Table Notifications (other columns, but not useful to example) id, profile_id, recipient_id, created, type, type_id, notify I only want to return * …

Member Avatar for stephen84s
0
77
Member Avatar for iwanwh

I have a simple query: [code=php]$query = "SELECT Item_Name, Item_wiki, Item_Website FROM items_list"; $result = mysql_query($query, $db) or die(mysql_error($db)); // loop through the results while ($row = mysql_fetch_assoc($result)) { extract($row);[/code] I want to put another query inside it. I have a second table (item_clip) that holds the photos for each …

Member Avatar for iwanwh
0
67
Member Avatar for grr

[code=sql]SELECT DISTINCT COUNT(*) AS occurences, post_name, post_content FROM wp_posts WHERE ((post_name LIKE '%ihop%' OR post_content LIKE '%ihop%') OR(post_name LIKE '%pancak%' OR post_content LIKE '%pancak%')) ORDER BY occurences DESC[/code] I use wordpress and am writing a script. Here is the table: post_name ihop post_content pancake house Thanks, Ian

Member Avatar for grr
0
107
Member Avatar for josephbarros

Hi i need use this sql on mysql. [code=sql]WITH destinations (departure, arrival, connections, cost) AS (SELECT a.departure, a.arrival, 0, price FROM flights a WHERE a.departure = 'Chicago' OR a.departure = 'New York' UNION ALL SELECT r.departure, b.arrival, r.connections + 1, r.cost + b.price FROM destinations r, flights b WHERE r.arrival …

Member Avatar for josephbarros
0
86
Member Avatar for diafol

Hi all. Have been trying to get my head around a problem in my custom messaging system. This is my msg table: id (PK) datetime_posted (datetime) from_id (FK for user id) to_id (FK for user id) title (the title obviously) msg (the body) status (0 = inbox, 1 - removed) …

Member Avatar for diafol
0
80
Member Avatar for DangerDev

Hi, I want to connect with MySQL database form c#. Please suggest me best way to do this. Thanks.

Member Avatar for Ramesh S
0
123
Member Avatar for skubasteve

Hello, I have a tracking program I built for one of my websites so I know which keywords are getting visitors. Anyway, the tracking program works, but it fills my error logs with this one error: PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in... Anyway, …

Member Avatar for djjjozsi
0
115
Member Avatar for ibnyadam

I downloaded MySql Connector/J, but i dont know how to install this driver in my JDK or Tomcat on windows XP. I read J/Connector documentation but i cant understand it. I copy jar file in JDK\lib\ext. Please Help me in this situation. Thanks you all.

Member Avatar for stephen84s
0
115
Member Avatar for tmv105

Hi all, I am a student trying to access a database that is on a different server than where my web pages are stored. My webpages running PHP scripts are here (128.118.142.34 through 128.118.142.46) and my database is here (146.186.83.60) Here is the code that I implemented: [code]$con = mysql_connect(146.186.83.60, …

Member Avatar for spthorn
0
1K
Member Avatar for smasher

Hi ive got this bit of code, trying to reteach myself stuff about PHP ive forgotten and having a general play. However i can only get this code to half work [CODE]<?php include_once("connect.php"); $username=$_POST['username']; $password=$_POST['password']; $email=$_POST['email']; $existing= "select * from CSLE_User where Username = '$username'"; $exist=mysql_query($existing) or die (mysql_error()); $num=mysql_numrows($exist) …

Member Avatar for smasher
0
198
Member Avatar for hashinclude

Hello, please bear with me if this question is stupid. I'm fairly new to this and i really need to know. is it possible to use [B]"SELECT COUNT"[/B] to get the number of DIFFERENT values one column currently holds grouped by a value from another column.?

Member Avatar for cgyrob
0
153
Member Avatar for oscarresonable

Hi guyZz... I'm a beginner in programming world..,! Can you help me guyZz of restoring data of mysql using vb6 codes..... Any reply and some source is really appreciated.... Thanks in advance..... Oscar Resonable

Member Avatar for vb5prgrmr
0
117

The End.