I am using CubeCart to hopefully sell products in the near future.
I have a menu that goes multiple levels down and I am trying to load the menu straight from a database table.
I also want the cat_id and cat_father_id to be letters(varchar) instead of auto incrementing numbers.
Does anyone know is this is possible and maybe even how to do it?
At the moment i get the following feedback:
Error Message:
1064: 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 'TOOLS' at line 1
SQL:
SELECT cat_id FROM CubeCart_category WHERE cat_father_id = HAND TOOLS
The error does not appear when I change cat_father_id back to an auto_incrementing integer. I need it to be VARCHAR.
If anyone feels that he might be able to help then let me know what additional information would you need.
Thank You to everyone who will share any ideas/thoughts.
Navigation Links coming from a database table
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Navigation Links coming from a database table
Text needs to be quoted:
But you are probably destroying your database with this approach. If it was an auto increment int you should leave it, then in some other table there is probably that same int that relates back to this one, with another field like category_name and it contains HAND TOOLS.
Code: Select all
SELECT cat_id FROM CubeCart_category WHERE cat_father_id = 'HAND TOOLS'mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.