10,932 Topics
![]() | |
[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 : … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
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"); … | |
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. | |
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. … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 * … | |
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 … | |
[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 | |
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 … | |
![]() | 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) … ![]() |
Hi, I want to connect with MySQL database form c#. Please suggest me best way to do this. Thanks. | |
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, … | |
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. | |
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, … ![]() | |
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) … | |
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.? | |
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 |
The End.