Hey, I'm new to MySQL and web development as a whole. I designed and put up a website at ArtistsVale , effectively the bulk of the site is an Image gallery which I created through Fireworks/Dreamweaver/Painter.
I have a problem, however, with my gallery list on the site. I wanted to create the ability to reorder the list in my administration, however I've got no idea how to go about it or where to start. I contemplated messing with the IDs, but I read its good practice not to touch them and find other ways to do it.
Is there a way to assign each album some other unique ID upon creation and then have the ability to move them around in my gallery list?
Thanks!
Kevin
5 1738
Hey, I'm new to MySQL and web development as a whole. I designed and put up a website at ArtistsVale , effectively the bulk of the site is an Image gallery which I created through Fireworks/Dreamweaver/Painter.
I have a problem, however, with my gallery list on the site. I wanted to create the ability to reorder the list in my administration, however I've got no idea how to go about it or where to start. I contemplated messing with the IDs, but I read its good practice not to touch them and find other ways to do it.
Is there a way to assign each album some other unique ID upon creation and then have the ability to move them around in my gallery list?
Thanks!
Kevin
Normally you don't want to order data in the database but change it's order in the views that you extract from it. i.e The ordering should be specified at each connection depending on the user extracting the data.
Normally you don't want to order data in the database but change it's order in the views that you extract from it. i.e The ordering should be specified at each connection depending on the user extracting the data.
Ah OK, forgive me if I'm a little slow though. I think I see where your coming from, like for example how the users can sort entries by date or name etc.?
What I was more interested in though, was sorting the entries into a custom order, more for aesthetic value, or so that I can put similar items into groups that can't be ordered by any of their property values.
I'm not even sure if its possible? Should I be asking this in the PHP forum?
Thanks again!
Kevin
Ah OK, forgive me if I'm a little slow though. I think I see where your coming from, like for example how the users can sort entries by date or name etc.?
What I was more interested in though, was sorting the entries into a custom order, more for aesthetic value, or so that I can put similar items into groups that can't be ordered by any of their property values.
I'm not even sure if its possible? Should I be asking this in the PHP forum?
Thanks again!
Kevin
I'm not sure I fully understand what you mean but I have a feeling this might be done on the front end using PHP or maybe even Javascript.
Like, for example, currently my gallery list is:
* Drawings
* VAR 32
* VSW 33
* Work Pre-2002
* Work 2002-2006
* Digital Art
* Architecture
* The Word
I was hoping to gain the ability to just shove the entries into a different order where I want them, without being restricted to sorting by name or date etc. So if I felt like it, I could just move 'Drawings' below 'VSW33', or move 'Digital Art' above 'VAR 32' via my administration. Hope that makes it a little clearer.
I'm no expert on the matter, but I think it will still require some work from the database to order the entries?
Thanks, Kevin.
Like, for example, currently my gallery list is:
* Drawings
* VAR 32
* VSW 33
* Work Pre-2002
* Work 2002-2006
* Digital Art
* Architecture
* The Word
I was hoping to gain the ability to just shove the entries into a different order where I want them, without being restricted to sorting by name or date etc. So if I felt like it, I could just move 'Drawings' below 'VSW33', or move 'Digital Art' above 'VAR 32' via my administration. Hope that makes it a little clearer.
I'm no expert on the matter, but I think it will still require some work from the database to order the entries?
Thanks, Kevin.
You could simply add a column to your table named item_order (or anything, really), and use this in your database query, e.g. - SELECT * FROM $table ORDER BY item_order
.
The field item_order can then be edited in a form through PHP/mySQL, or directly in mySQLadmin.
cheers,
McErrick
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: AF |
last post by:
I am a real novice to php and MySQL, with about a week's worth of
reading and self tutoring. I have an urgent need to publish a
database of information and need some guidance on how to do this.
This question might be more suited to a MySQL newsgroup, but since php
and MySQL seem to have become almost married to one another, and since
getting the data out and displaying it is where my problem seems to
lie, I thought I would start with...
|
by: iwasinnihon |
last post by:
I don't usually like to do this, but I need help. I have gone over this code
and cannot figure out why it doesn't work. First of all it doesn't check to
see if you have filled in the required fields. Second, it doesn't submit the
information (it's supposed to send it to mySql and email it to me.) and
lastly, it doesn't bring up the thankyou.php after submitting the form. I
don't know enough about PHP to find the problem. If someone could...
|
by: Donald Tyler |
last post by:
Yes it can. But you should understand the three distinct levels of that
situation.
You need the following:
Database
Web Server
Server-Side Scripting Language
I would suggest using AMP (Apache, MySQL & PHP). If you want to know more
|
by: aars |
last post by:
Hello all,
I am creating a user administration system where system administrator
can activate services for a user, like webspace, a mail account or a
subdomain.
I now want to create a function that creates mysql databases and grant
the right privileges to a user. But the problem is that mysql wants to
have the plaintext password for the user in the "grant ... identified by
'pwd'" field, or in a manual query to update the password in...
|
by: MLH |
last post by:
A programmer developed an AMP (Apache/MySQL/PHP) application
for me. When he was done, he sent me the PHP files and the MySQL
dump file. Now, when I connect to the application on my LAN using
http://192.168.1.106/~mlh/credifree/index.php the AMP app still
thinks the data resides somewhere else. It runs fine - as long as I
leave my LAN's external internet connection up. But if I unplug my
LAN from the world, my app locks up.
Before I...
| |
by: zhengfish |
last post by:
Hi,All,
I try to install mysql-5.0.15 on RHEL3-U5.
But It give me a error.
MySQL-client-standard-5.0.15-0.rhel3.i386.rpm
MySQL-devel-standard-5.0.15-0.rhel3.i386.rpm
MySQL-server-standard-5.0.15-0.rhel3.i386.rpm
MySQL-shared-standard-5.0.15-0.rhel3.i386.rpm
MySQL-standard-debuginfo-5.0.15-0.rhel3.i386.rpm
|
by: taras.di |
last post by:
Hi everyone,
I've come across an extremely strange problem. The exact same query in
both mysql command line client, and mysql query browser gives entirely
different results. I was hoping someone out there could shed some
light.
Ok, the query (I've stripped it bare, the real query is a bit more
complex)...
|
by: cumupkid |
last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time.
I have created two forms, one that uploads to photo to the folder in the site root diorectory. One that uploads the info to mysql database. but...
When I try to upload them both ways at the same time i cant get it.
I am Including code for both pages i have working.
Code for...
|
by: jonathan184 |
last post by:
The code seems to be working fine for some records but I am thinking it is finding some other records with special characters and so on. I am looking for a way to insert the xml string with escaping a bunch of chars
This is the message i got
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your M
ySQL server version for the right syntax to use near 'd to test@email.com...
|
by: subho2009 |
last post by:
Hello friends,
I have face a problem, the problem is that when i fetch data from mysql database i get '&' in the place of '&'. I am using php 5.1.2 and mysql version 5.0.11-beta.
What is the problem? any body solve my problem?
Please answer me.
Thanks in advance!
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |